Having the option of customized classes but a unified class name

后端 未结 5 1973
甜味超标
甜味超标 2021-01-02 21:35

Suppose you are building a web application that is going to be a packaged product one day, one that users will want to be able to extend and customize.

It comes with

5条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-02 22:04

    You could have a loader class that will decide which class to instance:

    Loader::instance()->load('Frontend')
    

提交回复
热议问题