/** * 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); } }
/** * 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; } }
/** * 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; } }
/** * Get property of element * * @param string $propertyName * @return mixed */ public function getProperty($propertyName) { if ($propertyName == "Value") { return $this->getValue(); } $ret = parent::getProperty($propertyName); if ($ret) { return $ret; } return $this->{$propertyName}; }