Registry
Stores settings, options, and meta data., (*1)
<?php
/* @var \ICanBoogie\Application $app */
$registry = $app->registry;
$a = $registry['a_property']; // null
$a = $registry->get('a_property', 123); // 123
$registry['a_property'] = 123;
$a = $registry['a_property']; // 123
$app->user->metas['a_property'] = 123;
$app->site->metas['a_property'] = 123;
$app->models['articles']->one->metas['a_property'] = 123;
Requirement
The package requires PHP 5.6 or later., (*2)
Installation
The recommended way to install this package is through Composer:, (*3)
$ composer require icybee/module-registry
This module is part of the modules required by Icybee., (*4)
Cloning the repository
The package is available on GitHub, its repository can be
cloned with the following command line:, (*5)
$ git clone https://github.com/Icybee/module-registry.git registry
Documentation
The package is documented as part of the Icybee CMS
documentation. The documentation for the package and its
dependencies can be generated with the make doc
command. The documentation is generated in
the docs
directory using ApiGen. The package directory can later by
cleaned with the make clean
command., (*6)
Testing
The test suite is ran with the make test
command. Composer is
automatically installed as well as all the dependencies required to run the suite. The package
directory can later be cleaned with the make clean
command., (*7)
The package is continuously tested by Travis CI., (*8)
, (*9)
License
The module is licensed under the New BSD License - See the LICENSE file for details., (*10)