Хранилища Subversion ant

Сравнить редакции

Не учитывать пробелы Редакция 372 → Редакция 373

/branches/ant-ng/lib/template.php
24,15 → 24,17
$this->path = $folder;
}
public function display($name, $attrs = null) {
public function display($name) {
$fh = fopen($this->path.$name, "r");
$content = fread($fh, filesize($this->path.$name));
fclose($fh);
foreach ($attrs as $attr) {
$content = str_replace("{".$attr."}", $this->__get($attr), $content);
preg_match_all("/({[\d\w]+})/", $content, $matches);
$tmpl = $matches[0];
for($i=0;$i<=count($tmpl);$i++) {
$content = str_replace("{".$tmpl[$i]."}", $this->__get($tmpl[$i]), $content);
}
 
return $content;
echo $content;
}
 
public function assign($attr, $value) {