Exemplo n.º 1
0
 /**
  * Get the property of the object. Used in expression language
  * 
  * @param string $propertyName name of the property
  * @return BizField|string property value
  */
 public function getProperty($propertyName)
 {
     $ret = parent::getProperty($propertyName);
     if ($ret) {
         return $ret;
     }
     if ($propertyName == "Table") {
         return $this->table;
     }
     if ($propertyName == "SearchRule") {
         return $this->searchRule;
     }
     // get control object if propertyName is "Field[fldname]"
     $pos1 = strpos($propertyName, "[");
     $pos2 = strpos($propertyName, "]");
     if ($pos1 > 0 && $pos2 > $pos1) {
         $propType = substr($propertyName, 0, $pos1);
         $fieldName = substr($propertyName, $pos1 + 1, $pos2 - $pos1 - 1);
         if ($propType == "param") {
             // get parameter
             return $this->parameters->get($fieldName);
         }
         return $this->getField($fieldName);
     }
 }
Exemplo n.º 2
0
 /**
  * Get property value
  * 
  * @param string $propertyName property name
  * @return mixed property value
  */
 public function getProperty($propertyName)
 {
     $ret = parent::getProperty($propertyName);
     if ($ret) {
         return $ret;
     }
     //if ($propertyName == "Value") return $this->getValue();
     if ($propertyName == "Value") {
         return $this->lookupValue();
     }
     return $this->{$propertyName};
 }
Exemplo n.º 3
0
 /**
  * Get object property
  * This method get element object if propertyName is "Elements[elementName]" format.
  *
  * @param string $propertyName
  * @return <type>
  */
 public function getProperty($propertyName)
 {
     $ret = parent::getProperty($propertyName);
     if ($ret !== null) {
         return $ret;
     }
     $pos1 = strpos($propertyName, "[");
     $pos2 = strpos($propertyName, "]");
     if ($pos1 > 0 && $pos2 > $pos1) {
         $propType = substr($propertyName, 0, $pos1);
         $elementName = substr($propertyName, $pos1 + 1, $pos2 - $pos1 - 1);
         switch (strtolower($propType)) {
             case 'param':
             case 'params':
                 $result = $this->formParams[$elementName];
                 break;
             default:
                 $result = $this->getElement($elementName);
                 break;
         }
         return $result;
     }
 }
Exemplo n.º 4
0
 /**
  * Get object property
  * This method get element object if propertyName is "Elements[elementName]" format.
  *
  * @param string $propertyName
  * @return <type>
  */
 public function getProperty($propertyName)
 {
     $ret = parent::getProperty($propertyName);
     if ($ret !== null) {
         return $ret;
     }
     $pos1 = strpos($propertyName, "[");
     $pos2 = strpos($propertyName, "]");
     if ($pos1 > 0 && $pos2 > $pos1) {
         $propType = substr($propertyName, 0, $pos1);
         $elementName = substr($propertyName, $pos1 + 1, $pos2 - $pos1 - 1);
         $result = $this->getElement($elementName);
         return $result;
     }
 }