Design pattern for implementing plugins in PHP applications

后端 未结 6 952
温柔的废话
温柔的废话 2021-01-30 23:15

Is there a consensus on how plugins should be implemented in a PHP application?

I\'ve looked into the observer pattern which comes close, it\'s really just a notificati

6条回答
  •  眼角桃花
    2021-01-30 23:53

    Zend Framework is using the dispatchLoopStartup() and dispatchLoopShutdown() hooks as class methods. Each plugin is a class that implements the aforementioned methods.

    ZF manual reference

提交回复
热议问题