registerProperty() 공개 메소드

public registerProperty ( $name, transphporm\Property $property )
$property transphporm\Property
예제 #1
0
 public function load(\Transphporm\Config $config)
 {
     $data = $config->getFunctionSet();
     $headers =& $config->getHeaders();
     $config->registerProperty('content', new \Transphporm\Property\Content($headers, $config->getFormatter()));
     $config->registerProperty('repeat', new \Transphporm\Property\Repeat($data, $config->getElementData(), $config->getLine()));
     $config->registerProperty('display', new \Transphporm\Property\Display());
     $config->registerProperty('bind', new \Transphporm\Property\Bind($config->getElementData()));
 }
예제 #2
0
 public function load(\Transphporm\Config $config)
 {
     if (!isset($_SESSION['messages'])) {
         $_SESSION['messages'] = [];
     }
     $headers =& $config->getHeaders();
     $functionSet = $config->getFunctionSet();
     $config->registerProperty('message', new Message());
     $functionSet->addFunction('messages', new Messages($headers));
 }