Download the PHP package anekdotes/meta without Composer
On this page you can find all versions of the php package anekdotes/meta. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download anekdotes/meta
More information about anekdotes/meta
Files in anekdotes/meta
Package meta
Short Description Contains utility classes meant to reference themselves and manipulate events/storage
License MIT
Informations about the package meta
Anekdotes Meta
Contains utility classes meant to reference themselves and manipulate events/storage
Installation
Install via composer into your project:
composer require anekdotes/meta
Basic Usage
Call the namespace of the object you want to use and use its functions. There are many utilities classes to choose from, described below:
Registry
A data storage class. Meant to be extended and to load arrays in dot notation.
Additional functions to manipulate registries can be found in the source code
StaticRegistry
The StaticRegistry is a Singleton instance of the Registry.
Config
A file loader that fills a registry based on the file content.
It can also load folder of config files.
Files must use the following format :
Since Config extends Registry, you can obtain the content as with a registry.
Loading files can also be prefixed with the filename and have an additonal namespace as prefix
Dispatcher
The Dispatcher allows an observer design pattern usage. It simply stores listener functions that gets fired when their action is called.
ObjectArrayActionDispatcher
The Object Array Action Dispatcher (OAAD) is a different kind of action dispatcher. It treats an array of objects having different actions to be called.
To use, simply : 1 - create the OAAD with the objects that have a function with the same signature to be called 2 - Call the function on the dispatcher
The following examples demonstrates calling set on multiples registries using an OOAD.