Source of file RegularAccess.php
Size: 1,313 Bytes - Last Modified: 2017-11-08T13:54:24+00:00
/home/travis/build/bluzphp/framework/src/Common/Container/RegularAccess.php
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 | <?php /** * Bluz Framework Component * * @copyright Bluz PHP Team * @link https://github.com/bluzphp/framework */ declare(strict_types=1); namespace Bluz\Common\Container; /** * Implements regular access to container * * @package Bluz\Common * @author Anton Shevchuk * * @method void doSetContainer($key, $value) * @method mixed doGetContainer($key) * @method bool doContainsContainer($key) * @method void doDeleteContainer($key) */ trait RegularAccess { /** * Set key/value pair * * @param string $key * @param mixed $value * * @return void */ public function set($key, $value) { $this->doSetContainer($key, $value); } /** * Get value by key * * @param string $key * * @return mixed */ public function get($key) { return $this->doGetContainer($key); } /** * Check contains key in container * * @param string $key * * @return bool */ public function contains($key) { return $this->doContainsContainer($key); } /** * Delete value by key * * @param string $key * * @return void */ public function delete($key) { $this->doDeleteContainer($key); } } |