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


PHP LimeExpressionManager::GetVarAttribute方法代码示例

本文整理汇总了PHP中LimeExpressionManager::GetVarAttribute方法的典型用法代码示例。如果您正苦于以下问题:PHP LimeExpressionManager::GetVarAttribute方法的具体用法?PHP LimeExpressionManager::GetVarAttribute怎么用?PHP LimeExpressionManager::GetVarAttribute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LimeExpressionManager的用法示例。


在下文中一共展示了LimeExpressionManager::GetVarAttribute方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: ProcessBooleanExpression

 /**
  * Process an expression and return its boolean value
  * @param <type> $expr
  * @param <type> $groupSeq - needed to determine whether using variables before they are declared
  * @param <type> $questionSeq - needed to determine whether using variables before they are declared
  * @return <type>
  */
 public function ProcessBooleanExpression($expr, $groupSeq = -1, $questionSeq = -1)
 {
     $this->groupSeq = $groupSeq;
     $this->questionSeq = $questionSeq;
     $expr = $this->ExpandThisVar($expr);
     $status = $this->RDP_Evaluate($expr);
     if (!$status) {
         return false;
         // if there are errors in the expression, hide it?
     }
     $result = $this->GetResult();
     if (is_null($result)) {
         return false;
         // if there are errors in the expression, hide it?
     }
     //        if ($result == 'false') {
     //            return false;    // since the string 'false' is not considered boolean false, but an expression in JavaScript can return 'false'
     //        }
     //        return !empty($result);
     // Check whether any variables are irrelevant - making this comparable to JavaScript which uses LEManyNA(varlist) to do the same thing
     foreach ($this->GetVarsUsed() as $var) {
         if (!preg_match("/^.*\\.(NAOK|relevanceStatus)\$/", $var)) {
             if (!LimeExpressionManager::GetVarAttribute($var, 'relevanceStatus', false, $groupSeq, $questionSeq)) {
                 return false;
             }
         }
     }
     return (bool) $result;
 }
开发者ID:krsandesh,项目名称:LimeSurvey,代码行数:36,代码来源:em_core_helper.php

示例2: GetVarAttribute

 /**
  * Get information about the variable, including JavaScript name, read-write status, and whether set on current page.
  * @param <type> $varname
  * @return <type>
  */
 private function GetVarAttribute($name, $attr, $default)
 {
     return LimeExpressionManager::GetVarAttribute($name, $attr, $default, $this->groupSeq, $this->questionSeq);
 }
开发者ID:rkaldung,项目名称:LimeSurvey,代码行数:9,代码来源:ExpressionManager.php


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