Yaf_View_Simple
PHP Manual

Yaf_View_Simple::__construct

(PECL yaf >=1.0.0)

Yaf_View_Simple::__constructThe __construct purpose

Description

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

Warning

This function is currently not documented; only its argument list is available.

Parameters

tempalte_dir

The base directory of the templates, by default, it is APPLICATOIN . "/views" for Yaf.

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.

Examples

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
   
));
?>

Return Values


Yaf_View_Simple
PHP Manual