for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Linna Framework.
*
* @author Sebastian Rapetti <[email protected]>
* @copyright (c) 2018, Sebastian Rapetti
* @license http://opensource.org/licenses/MIT MIT License
*/
declare(strict_types=1);
namespace Linna\Container;
* Array Access Trait
* Provide to DIContainer the possibility to retrive values using array notation.
trait ArrayAccessTrait
{
* Express Requirements by Abstract Methods.
* @param string $key
abstract public function has($key);
abstract public function get($key);
* @param mixed $value
abstract public function set($key, $value);
abstract public function delete($key): bool;
* Check.
* @return bool
* @ignore
public function offsetExists($key)
return $this->has($key);
}
* Get.
* @return mixed
public function offsetGet($key)
return $this->get($key);
* Store.
public function offsetSet($key, $value)
$this->set($key, $value);
* Delete.
public function offsetUnset($key)
return $this->delete($key);