いろいろ準備中

Archive for 3月 18th, 2008

[Zend Framework][Smarty] Zend_ControllerへSmarty組み込む

火曜日, 3月 18th, 2008 Posted in Zend Framework | No Comments »

Zend_ViewでSmartyを使う方法は、このページを参考に、Zend_View_Interfaceを実装して、最低限Smartyのプロパティである$template_dirと$compile_dirを設定してあげれば使えます。 require_once 'Zend/View/Interface.php'; require_once 'Smarty/Smarty.class.php'; class ViewSmarty implements Zend_View_Interface { ... } 上記のようなviewクラスを作ったら、以下のように初期化します。