/branches/ant-ng/lib/template.php |
---|
25,12 → 25,20 |
} |
public function display($name, $attrs = null) { |
//TODO написать функцию шаблонизатора |
$content = implode('',$this->path.$name); |
foreach ($attrs as $attr) { |
$content = str_replace("{".$attr."}", $this->__get($attr), $content); |
} |
return $content; |
} |
public function assign($attr, $value) { |
return $this->self[$attr] = $value; |
} |
public function __get($attr = null) { |
return $this->self[$attr]; |
} |
} |
?> |