Source for file Ethna_Renderer_Rhaco.php
Documentation is available at Ethna_Renderer_Rhaco.php
* Ethna_Renderer_Rhaco.php (experimental)
* @author TSURUOKA Naoya <tsuruoka@php.net>
* @license http://www.opensource.org/licenses/bsd-license.php The BSD License
* @version $Id: Ethna_Renderer_Rhaco.php,v 1.16 2007/01/17 18:38:51 ichii386 Exp $
require_once 'rhaco/Rhaco.php';
require_once 'rhaco/tag/TemplateParser.php';
require_once ETHNA_BASE .
'/class/Ethna_SmartyPlugin.php';
/** @var string compile directory */
* @var TemplateParser_Ethna $engine
* Ethna_Renderer_Rhacoクラスのコンストラクタ
parent::Ethna_Renderer($controller);
$this->compile_dir =
$controller->getDirectory('template_c');
$this->setTemplateDir($template_dir);
$this->compile_dir = $compile_dir;
* @param string $template テンプレート名
* @param bool $capture true ならば出力を表示せずに返す
function perform($template =
null, $capture =
false)
if ($template ===
null &&
$this->template ===
null) {
if ($template !==
null) {
$this->template =
$template;
$captured =
$this->engine->read($this->template);
$captured =
$this->engine->read($this->template);
* @param string $name 変数名
$property =
& $this->engine->variables[$name];
if ($property !==
null) {
$this->engine->setVariable($array);
//$this->engine->assign_by_ref($array);
* @param string $name 変数名
$this->engine->setVariable($name, $value);
* @param string $name 変数名
$this->engine->setVariable($name, $value);
//$this->engine->assign_by_ref($name, $value);
$this->setPlugin('number_format','modifier','smarty_modifier_number_format');
$this->setPlugin('strftime','modifier','smarty_modifier_strftime');
$this->setPlugin('count','modifier','smarty_modifier_count');
$this->setPlugin('join','modifier','smarty_modifier_join');
$this->setPlugin('filter','modifier', 'smarty_modifier_filter');
$this->setPlugin('unique','modifier','smarty_modifier_unique');
$this->setPlugin('wordwrap_i18n','modifier','smarty_modifier_wordwrap_i18n');
$this->setPlugin('truncate_i18n','modifier','smarty_modifier_truncate_i18n');
$this->setPlugin('i18n','modifier','smarty_modifier_i18n');
$this->setPlugin('checkbox','modifier','smarty_modifier_checkbox');
$this->setPlugin('select','modifier','smarty_modifier_select');
$this->setPlugin('form_value','modifier','smarty_modifier_form_value');
$this->setPlugin('is_error','function','smarty_function_is_error');
$this->setPlugin('message','function','smarty_function_message');
$this->setPlugin('uniqid','function','smarty_function_uniqid');
$this->setPlugin('select','function','smarty_function_select');
$this->setPlugin('checkbox_list','function','smarty_function_checkbox_list');
$this->setPlugin('form_name','function','smarty_function_form_name');
$this->setPlugin('form_input','function','smarty_function_form_input');
$this->setPlugin('form_submit','function','smarty_function_form_submit');
$this->setPlugin('url','function','smarty_function_url');
$this->setPlugin('csrfid','function','smarty_function_csrfid');
$this->setPlugin('form','block','smarty_block_form');
* fake property for Smaty
* smarty_function dispatcher
foreach($smarty_plugin_list as $name =>
$plugin_config) {
if ($plugin_config['type'] ==
'function') {
$plugin_config['plugin']($param, $this),
} else if ($plugin_config['type'] ==
'block') {
$param_list =
$tag->getParameter();
foreach ($param_list as $param_tag) {
$param[$param_tag->getName()] =
$param_tag->getValue();
$content =
$tag->getValue();
//before(not return value)
$result =
$plugin_config['plugin']($param, $content, $this, $repeat_before);
$result =
$plugin_config['plugin']($param, $content, $this, $repeat_after);
* TemplateParser _getTagName
Documentation generated on Fri, 11 Nov 2011 04:00:48 +0900 by phpDocumentor 1.4.3