Download the PHP package loadsys/cakephp-libregistry without Composer
On this page you can find all versions of the php package loadsys/cakephp-libregistry. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download loadsys/cakephp-libregistry
More information about loadsys/cakephp-libregistry
Files in loadsys/cakephp-libregistry
Package cakephp-libregistry
Short Description The LibRegistry provides a mechanism for loading and storing instances of non-Cake PHP libraries. It works a lot like Cake 3's TableRegistry. Object instances can be requested by name and instantiated automatically, or can be loaded into the registry manually.
License MIT
Homepage https://github.com/loadsys/CakePHP-LibRegistry
Informations about the package cakephp-libregistry
CakePHP LibRegistry Plugin
The LibRegistry provides a mechanism for loading and storing instances of non-Cake PHP libraries. It works a lot like Cake 3's TableRegistry
. Object instances can be requested by name and instantiated automatically, or can be loaded into the registry manually.
Requirements
- CakePHP 3.0+
Installation
Composer
`
Usage
-
Invoke the LibRegistry statically:
- A trait is also provided to load libraries into existing classes:
Library classes
-
Must exist in
src/Lib/
in your Cake app or plugin and must be namespaced appropriately. - Must accept a single array of config values as the sole
__construct()
argument. Libraries that don't conform to this interface can't be instantiated viaLibRegistry::get()
, although they can still be stored in the Registry manually via::set()
.
Contributing
Code of Conduct
This project has adopted the Contributor Covenant as its Translations are available.
Reporting Issues
Please use GitHub Isuses for listing any known defects or issues.
Development
Please fork and issue a PR targeting the master
branch for any new development.
The full test suite for the plugin can be run via this command:
Code must conform to the Loadsys coding standard, which is based on the CakePHP coding standard: