public function DynamicAttributes($attributes) { foreach ($attributes as $name => $att) { if (strpos($name, 'out:') !== FALSE) { $real_name = DynamicAttributes::realName($name); eval('$this->dynamic_attributes[$real_name] = ' . Display::prepareRsmlValue($att) . ';'); } } }
function RemoteOut($attributes, $data = '') { $this->RsmlOut($attributes, $data); eval('$this->rsml_value = ' . Display::prepareRsmlValue($this->data) . ';'); }
function templateData($context) { if ($context != RsmlNode::CTX_TEMPLATE) { throw new InvalidContextException('A conditional statement only knows how to print itself in a TEMPLATE context'); } switch ($this->type) { case RsmlConditionalStatement::IF_STAT: $type = 'if'; break; case RsmlConditionalStatement::ELSE_IF_STAT: $type = 'else if'; break; case RsmlConditionalStatement::ELSE_STAT: $type = 'else'; break; } $statement = ''; foreach ($this->children as $child) { $statement .= $child->templateData(RsmlNode::CTX_FUNCTION_ARGUMENT); } $cond_match = '/(\\!\\=|\\=\\=|\\&\\&|\\|\\||Display::rsmlValue)/'; if (!preg_match($cond_match, $statement)) { $statement = 'Display::rsmlValue($disp->variables(),' . Display::prepareRsmlValue($statement) . ')'; } if ($this->type != RsmlConditionalStatement::ELSE_STAT) { $statement = '(' . $statement . ')'; } else { $statement = ''; } $ret = ' <?php ' . $type . $statement . ' { ?> '; return $ret; }
function templateData($context) { switch ($context) { case RsmlNode::CTX_TEMPLATE: $ret = '<?php $disp->out(Display::rsmlValue($disp->variables(),' . Display::prepareRsmlValue($this->data) . '));?>'; break; case RsmlNode::CTX_ARRAY_ARGUMENT: case RsmlNode::CTX_FUNCTION_ARGUMENT: $ret = 'Display::rsmlValue($disp->variables(),' . Display::prepareRsmlValue($this->data) . ')'; break; case RsmlNode::CTX_INLINE: $ret = '\'.Display::rsmlValue($disp->variables(),' . Display::prepareRsmlValue($this->data) . ').\''; break; case RsmlNode::CTX_PLAIN: $ret = $this->data; break; default: throw new InvalidContextException('An out node only knows how to display in TEMPLATE, FUNCTION_ARGUMENT OR INLINE contexts'); break; } return $ret; }
function templateData($context) { try { $data = $this->attribute('data'); } catch (InvalidAttributeException $exc) { $data = ''; } switch ($context) { case RsmlNode::CTX_TEMPLATE: $ret = '<?php $disp->out(Display::rsmlValue($' . $this->pattern_name . '_pattern_loop_var,' . Display::prepareRsmlValue($data) . ',true));?>'; break; case RsmlNode::CTX_FUNCTION_ARGUMENT: $ret = 'Display::rsmlValue($' . $this->pattern_name . '_pattern_loop_var,' . Display::prepareRsmlValue($data) . ',true)'; break; case RsmlNode::CTX_INLINE: $ret = '\'.Display::rsmlValue($' . $this->pattern_name . '_pattern_loop_var,' . Display::prepareRsmlValue($data) . ',true).\''; break; } return $ret; }