« Yaf_View_Simple::clear
Yaf_View_Simple::display »

Yaf_View_Simple::__construct

(Yaf >=1.0.0)

Yaf_View_Simple::__construct — Yaf_View_Simple のコンストラクタ

説明

final public function Yaf_View_Simple::__construct(string $template_dir, array $options = ?)

パラメータ

template_dir

テンプレートのベースディレクトリ。デフォルトは APPLICATOIN . "/views" です。

options

エンジンのオプション。Yaf 2.1.13 からは、短いタグ
      "<?=$var?>" を ("short_open_tag" の値にかかわらず)
      テンプレートで使えるようになりました。
      オプション "short_tag" をオフにすると、テンプレートで短いタグを使わないようにできます。

例

例1 Yaf_View_Simple::__construct() の例

<?php
   define ("TEMPLATE_DIRECTORY", APPLICATOIN_PATH . '/views');
   $view = new Yaf_View_Simple(TEMPLATE_DIRECTORY, array(
                           'short_tag' => false // テンプレートで短いタグを使わせないようにします
   ));
?>
関連キーワード:
View   construct   テンプレート   コンストラクタ   タグ   short   template   options   views   clear   display   final   ベース   エンジン   オフ   define   view
関連する関数・ページ:
yaf-view-simple.getscriptpath   yaf-view-simple.setscriptpath   yaf-view-simple.set   class.yaf-view-simple   yaf-view-simple.render   yaf-view-simple.eval