Download the PHP package liip/drupalregistrymodule without Composer
On this page you can find all versions of the php package liip/drupalregistrymodule. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download liip/drupalregistrymodule
More information about liip/drupalregistrymodule
Files in liip/drupalregistrymodule
Package drupalregistrymodule
Short Description This module provides an API to by used to persist/cache information.
License MIT
Informations about the package drupalregistrymodule
Liip Drupal Registry Module
This module provides an API to store key/value pairs of information.
The Idea came when we had to change the persistence layer of how custom data is stored to be available to the system later.
We started with the standard Drupal 7 way to cache data by implementing a facade to the variable_get()
, variable_set()
, variable_del()
functions. This implementation is
provided as the default and example implementation for the registry.
Restrictions
It is not possible to store other objects than value objects without private members. Keep in mind that objects of any instance will be converted to instances of stdClass.
Current Travis Status
Installation
The source is now PSR-0 compatible. There is no specific installation routine to be followed. Just clone or checkout the source into to your project
and use it.
In case you don't use a PSR-0 compatible autoloader, you only have to add the bootstrap.php
into your bootstrap or
autoloader.
Composer
Add the following lines to your composer.json
file and update your project's composer installation.
This composer configuration will checkout the 'cutting eadge' version ('dev-master') of the project. Be alarmed that this might be broken sometimes.
NOTE: In case you do not know what this means the composer project website is a good place to start.
Github
Thus I recommend the composer way to make LiipDrupalRegistryModule a dependency to your project. The sources are also available via github. Just clone it as you might be familiar with.
Dependencies
- LiipDrupalConnector (https://github.com/liip/LiipDrupalConnectorModule.git)
- Assert (http://github.com/beberlei/assert)
Optional
- Elastica (https://github.com/ruflin/elastica)
Usage
A good place to find examples of how this library works is always the Tests folder. For those not familiar with PHPUnit a short intro:
Dispatching registry actions
It turned out there is a need to multiply an action to a number of registries. In our case we needed to store data to an ElasticSearch custer and - for backup reasons - to a MySql database. To achieve this the dispatcher was introduced.
Providing a container to attach registries the dispatcher invokes the requested action on every registered registry. Example:
Supported Systems
- D7 configuration array (facade to variable_get(), variable_set(), variable_del())
- Elasticsearch (based on the elastica library)
- Memory
- MySql
All versions of drupalregistrymodule with dependencies
liip/drupalconnectormodule Version dev-master
liip/registryadaptor Version dev-master
beberlei/assert Version dev-master
ruflin/elastica Version 0.20.5.0.RC1