[PHPTAL] setPreFilter dosen't work?
Mynthon
mynthon1 at gmail.com
Mon May 14 15:27:45 CEST 2007
1st thing: i don't know why but 'PHPTAL/Filter.php' isn't included by
default. Is it necessary to set up phptal dir if i have right include
path in my php.ini?
2nd. can't use setPreFilter. Code:
class MyPostFilter implements PHPTAL_Filter {
public function filter($xhtml){
echo 'test';
return $xhtml;
}
}
$template->setPostFilter(new MyPostFilter());
echo $template->execute();
works ok. but:
class MyPreFilter implements PHPTAL_Filter {
public function filter($source){
echo 'test';
return $source;
}
}
$template->setPreFilter(new MyPreFilter());
echo $template->execute();
doesn't work. Ive also tried:
public function filter($source){
exit();
}
and
public function filter($source){
return '';
}
and
public function filter($source){
return 'test';
}
but it does not work (i always get template file generated properly). Any ideas?
--
mynthon
http://www.mynthon.net
More information about the PHPTAL
mailing list