当前位置: 首页>>代码示例>>PHP>>正文


PHP Display::prepareRsmlValue方法代码示例

本文整理汇总了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) . ';');
         }
     }
 }
开发者ID:k7n4n5t3w4rt,项目名称:SeeingSystem,代码行数:9,代码来源:dynamic_attributes.class.php

示例2: RemoteOut

 function RemoteOut($attributes, $data = '')
 {
     $this->RsmlOut($attributes, $data);
     eval('$this->rsml_value = ' . Display::prepareRsmlValue($this->data) . ';');
 }
开发者ID:k7n4n5t3w4rt,项目名称:SeeingSystem,代码行数:5,代码来源:remote_out.class.php

示例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;
    }
开发者ID:k7n4n5t3w4rt,项目名称:SeeingSystem,代码行数:37,代码来源:rsml_conditional_statement.class.php

示例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;
 }
开发者ID:k7n4n5t3w4rt,项目名称:SeeingSystem,代码行数:22,代码来源:rsml_out.class.php

示例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;
 }
开发者ID:k7n4n5t3w4rt,项目名称:SeeingSystem,代码行数:20,代码来源:rsml_local.class.php


注:本文中的Display::prepareRsmlValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。