line = $line; $this->name = $name; $this->tpl = $tpl; $this->_action = $action; } public function setFuncName($function) { $this["function"] = $function; $this->is_compiler = false; } public function open($tokenizer) { return call_user_func($this->_action["open"], $tokenizer, $this); } public function hasTag($tag, $level) { if(isset($this->_action["tags"][$tag])) { if($level) { return isset($this->_action["float_tags"][$tag]); } else { return true; } } return false; } public function tag($tag, $tokenizer) { return call_user_func($this->_action["tags"][$tag], $tokenizer, $this); } public function close($tokenizer) { return call_user_func($this->_action["close"], $tokenizer, $this); } /** * Count chars to close tag * @todo * @return int */ public function getDistanceToClose() { return 1; } }