Phrozn\Registry\Container::get PHP Method

get() public method

Get property value
public get ( string $name ) : mixed
$name string Property name
return mixed
    public function get($name)
    {
        if (!isset($this->values[$name])) {
            return null;
        }
        return $this->values[$name];
    }

Usage Example

Example #1
0
 public function testNoRegistryFile()
 {
     $container = new Container();
     $arr = array(1, 2, 3);
     $container->set('template', $arr);
     $dao = new Dao($container);
     $dao->setOutputFile('not-found');
     $this->assertSame($arr, $container->get('template'));
     $dao->read();
     $this->assertNull($container->getValues());
     $this->assertNull($container->get('template'));
 }
All Usage Examples Of Phrozn\Registry\Container::get