本文整理汇总了PHP中Display::prepareRsmlValue方法的典型用法代码示例。如果您正苦于以下问题:PHP Display::prepareRsmlValue方法的具体用法?PHP Display::prepareRsmlValue怎么用?PHP Display::prepareRsmlValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Display
的用法示例。
在下文中一共展示了Display::prepareRsmlValue方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: DynamicAttributes
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) . ';');
}
}
}
示例2: RemoteOut
function RemoteOut($attributes, $data = '')
{
$this->RsmlOut($attributes, $data);
eval('$this->rsml_value = ' . Display::prepareRsmlValue($this->data) . ';');
}
示例3: templateData
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;
}
示例4: templateData
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;
}
示例5: templateData
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;
}