コード例 #1
0
ファイル: BasicTagLib.php プロジェクト: hofmeister/Pimple
 /**
  * Set a variable on the current view
  * @param string name
  * @param mixed value
  * @param boolean global | set it globally or just this view - defaults to false
  */
 protected function tagSet($attrs, $view)
 {
     $value = $attrs->value ? $attrs->value : $this->body();
     if ($attrs->global == 'true') {
         DataUtil::set(self::$globalVars, $attrs->name, $value);
     } else {
         DataUtil::set($view->data, $attrs->name, $value);
     }
 }