PHP code example of icybee / module-registry
1. Go to this page and download the library: Download icybee/module-registry library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
icybee / module-registry example snippets
/* @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;