Warning: This page has not been updated in over over a year and may be outdated or deprecated.
development:plugins:auto_injection_interfaces
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
development:plugins:auto_injection_interfaces [2015/12/09 19:45] – ↷ Links adapted because of a move operation demiankatz | development:plugins:auto_injection_interfaces [2020/03/03 20:26] (current) – demiankatz | ||
---|---|---|---|
Line 5: | Line 5: | ||
Here are the relevant interfaces: | Here are the relevant interfaces: | ||
- | * \VuFind\Db\Table\DbTableAwareInterface | + | * \Laminas\Log\LoggerAwareInterface |
- | * \VuFind\I18n\Translator\TranslatorAwareInterface | + | * \VuFind\Db\Table\DbTableAwareInterface |
- | * \VuFindHttp\HttpServiceAwareInterface - Get access to the VuFind\Http service | + | * \VuFind\I18n\Translator\TranslatorAwareInterface |
- | * \Zend\Log\LoggerAwareInterface | + | * \VuFindHttp\HttpServiceAwareInterface |
- | * \Zend\ServiceManager\ServiceLocatorAwareInterface | + | |
* \ZfcRbac\Service\AuthorizationServiceAwareInterface - Get access to the authorization service (for permission checks) | * \ZfcRbac\Service\AuthorizationServiceAwareInterface - Get access to the authorization service (for permission checks) | ||
- | |||
- | You can also implement a setPluginManager() method as an alternative to implementing the \Zend\ServiceManager\ServiceLocatorAwareInterface; | ||
===== Traits ===== | ===== Traits ===== | ||
Line 22: | Line 19: | ||
* \VuFindHttp\HttpServiceAwareTrait | * \VuFindHttp\HttpServiceAwareTrait | ||
* \VuFind\Log\LoggerAwareTrait | * \VuFind\Log\LoggerAwareTrait | ||
- | * \Zend\ServiceManager\ServiceLocatorAwareTrait | ||
* \ZfcRbac\Service\AuthorizationServiceAwareInterface | * \ZfcRbac\Service\AuthorizationServiceAwareInterface | ||
+ | |||
+ | ===== Deprecated/ | ||
+ | |||
+ | As the framework behind VuFind has evolved, auto-injection has been recognized as an anti-pattern in many situations, and it is now largely discouraged. Thus, some related capabilities have been scaled back or removed. | ||
+ | |||
+ | * \Zend\ServiceManager\ServiceLocatorAwareTrait used to trigger auto-injection of the top-level service manager. As of VuFind 4.0, it is no longer supported. | ||
+ | * You used to be able to implement a setPluginManager() method as an alternative to implementing the \Zend\ServiceManager\ServiceLocatorAwareInterface; | ||
+ | * In VuFind 7.0, all Zend services were renamed to Laminas services because of the rebranding of the framework. | ||
+ | |||
---- struct data ---- | ---- struct data ---- | ||
+ | properties.Page Owner : | ||
---- | ---- | ||
development/plugins/auto_injection_interfaces.txt · Last modified: 2020/03/03 20:26 by demiankatz