Phrozn\Registry\Container::set PHP 메소드

set() 공개 메소드

Set property value
public set ( string $name, mixed $value ) : Container
$name string Property name
$value mixed Property value
리턴 Container
    public function set($name, $value)
    {
        $this->values[$name] = $value;
        return $this;
    }

Usage 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::set