Yaf_View_Simple::__construct

(Yaf >=1.0.0)

Yaf_View_Simple::__constructConstructor of Yaf_View_Simple

说锟斤拷

final public Yaf_View_Simple::__construct ( string $tempalte_dir [, array $options ] )

锟斤拷锟斤拷

tempalte_dir

模锟斤拷幕锟斤拷锟铰凤拷锟斤拷锟侥拷锟轿狝PPLICATOIN . "/views"

options

Options for the engine, as of Yaf 2.1.13, you can use short tag
      "<?=$var?>" in your template(regardless of "short_open_tag"), 
      so comes a option named "short_tag",  you can switch this off 
      to prevent use short_tag in template.

锟斤拷锟斤拷

Example #1 Yaf_View_Simple::__constructor()example

<?php
   define 
("TEMPLATE_DIRECTORY"APPLICATOIN_PATH '/views');
   
$view = new Yaf_View_Simple(TEMPLATE_DIRECTORY, array(
                           
'short_tag' => false //doesn't allow use short tag in template
   
));
?>

锟斤拷锟斤拷值