Source for file Smarty.php
Documentation is available at Smarty.php
// vim: foldmethod=marker
* @author Kazuhiro Hosoi <hosoi@gree.co.jp>
* @license http://www.opensource.org/licenses/bsd-license.php The BSD License
* @version $Id: 3b032a2300d205461f4e5da3bf56d98ba71ebd0b $
// {{{ Ethna_Renderer_Smarty
* @author Kazuhiro Hosoi <hosoi@gree.co.jp>
/** @private string compile directory */
/** @protected engine path (library) */
* Ethna_Renderer_Smartyクラスのコンストラクタ
$smarty_config = isset
($this->config['smarty'])
// ディレクトリ関連は Controllerによって実行時に設定
// TODO: iniファイルによって上書き可にするかは要検討
$template_dir =
$controller->getTemplatedir();
$compile_dir =
$controller->getDirectory('template_c');
$this->setTemplateDir($template_dir);
$this->compile_dir =
$compile_dir;
$this->engine->compile_dir =
$this->compile_dir;
$this->engine->left_delimiter =
$smarty_config['left_delimiter'];
$this->engine->right_delimiter =
$smarty_config['right_delimiter'];
// コンパイルディレクトリは必須なので一応がんばってみる
$controller->getDirectory('plugins'),
array(ETHNA_BASE .
'/class/Plugin/Smarty', SMARTY_DIR .
'plugins')
* @param string $template テンプレート名
* @param bool $capture true ならば出力を表示せずに返す
function perform($template =
null, $capture =
false)
if ($template ===
null &&
$this->template ===
null) {
if ($template !==
null) {
* @param string $name 変数名
$property =
$this->engine->get_template_vars($name);
if ($property !==
null) {
$this->engine->clear_assign($name);
$this->engine->assign($array);
$this->engine->assign_by_ref($array);
* @param string $name 変数名
$this->engine->assign($name, $value);
* @param string $name 変数名
$this->engine->assign_by_ref($name, $value);
* @param string $name プラグイン名
* @param string $type プラグインタイプ
* @param mixed $plugin プラグイン本体
$register_method =
'register_' .
$type;
if ($type ===
'prefilter' ||
$type ===
'postfilter' ||
$type ===
'outputfilter') {
parent::setPlugin($name, $type, $plugin);
$this->engine->$register_method($plugin);
parent::setPlugin($name, $type, $plugin);
$this->engine->$register_method($name, $plugin);
Documentation generated on Fri, 11 Nov 2011 03:59:05 +0900 by phpDocumentor 1.4.3