Source of file Registry.php
Size: 1,123 Bytes - Last Modified: 2017-11-08T13:54:24+00:00
/home/travis/build/bluzphp/framework/src/Proxy/Registry.php
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 | <?php /** * Bluz Framework Component * * @copyright Bluz PHP Team * @link https://github.com/bluzphp/framework */ declare(strict_types=1); namespace Bluz\Proxy; use Bluz\Registry\Registry as Instance; /** * Proxy to Registry * * Example of usage * <code> * use Bluz\Proxy\Registry; * * Registry::set('key', 'value'); * Registry::get('key'); * </code> * * @package Bluz\Proxy * @author Anton Shevchuk * * @method static Instance getInstance() * * @method static void set($key, $value) * @see Instance::set() * * @method static mixed get($key) * @see Instance::get() * * @method static bool contains($key) * @see Instance::contains() * * @method static void delete($key) * @see Instance::delete() */ final class Registry { use ProxyTrait; /** * Init instance * * @return Instance */ private static function initInstance() { $instance = new Instance(); if ($data = Config::getData('registry')) { $instance->setFromArray($data); } return $instance; } } |