Where to put plugins in a Zend Framework website

后端 未结 2 895
鱼传尺愫
鱼传尺愫 2021-01-05 08:02

The question is quite simple : I have a controller plugin for Zend Framework.

Should I put it in the \"library/Plugin\" folder, or in \"application/plugins\".

<
相关标签:
2条回答
  • 2021-01-05 08:15

    I generally put everything that is specific to my application, e.g. not reusable without modification into the appropriate application folder.

    For generic plugins, I create a new folder in library. This folder is modeled after the Zend library folder concerning names, e.g. My/Controller/Action/Helper or My/Controller/Plugin, etc. Putting stuff there is optional though, as you might as well put this in the appropriate application folder as well. I just like the distinction.

    I never put anything into the standard Zend distribution. This would get lost when updating.

    0 讨论(0)
  • 2021-01-05 08:31

    If its a controller plugin it goes in "application/plugins".
    If it's a general purpose plugin (ie Utility Classes and such) it goes in /library/*, where * follows the Zend Loader rules.

    0 讨论(0)
提交回复
热议问题