예제 #1
0
 /**
  * Read array meta data, and store to meta object
  *
  * @param array $xmlArr
  * @return void
  */
 protected function readMetadata(&$xmlArr)
 {
     parent::readMetaData($xmlArr);
     $this->targetReportPath = isset($xmlArr["PLUGINSERVICE"]["ATTRIBUTES"]["TARGETREPORTPATH"]) ? $xmlArr["PLUGINSERVICE"]["ATTRIBUTES"]["TARGETREPORTPATH"] : null;
     $this->rptTemplate = isset($xmlArr["PLUGINSERVICE"]["ATTRIBUTES"]["REPORTTEMPLATE"]) ? $xmlArr["PLUGINSERVICE"]["ATTRIBUTES"]["REPORTTEMPLATE"] : null;
     $this->birtViewer = isset($xmlArr["PLUGINSERVICE"]["ATTRIBUTES"]["BIRTVIEWER"]) ? $xmlArr["PLUGINSERVICE"]["ATTRIBUTES"]["BIRTVIEWER"] : null;
 }
예제 #2
0
 /**
  * Read Metadata from xml array
  * 
  * @param array $xmlArr
  * @return void
  */
 protected function readMetadata(&$xmlArr)
 {
     parent::readMetaData($xmlArr);
     $this->objectName = $this->prefixPackage($this->objectName);
     $this->title = isset($xmlArr["WEBPAGE"]["ATTRIBUTES"]["TITLE"]) ? $xmlArr["WEBPAGE"]["ATTRIBUTES"]["TITLE"] : null;
     $this->keywords = isset($xmlArr["WEBPAGE"]["ATTRIBUTES"]["KEYWORDS"]) ? $xmlArr["WEBPAGE"]["ATTRIBUTES"]["KEYWORDS"] : null;
     $this->templateEngine = isset($xmlArr["WEBPAGE"]["ATTRIBUTES"]["TEMPLATEENGINE"]) ? $xmlArr["WEBPAGE"]["ATTRIBUTES"]["TEMPLATEENGINE"] : null;
     $this->templateFile = isset($xmlArr["WEBPAGE"]["ATTRIBUTES"]["TEMPLATEFILE"]) ? $xmlArr["WEBPAGE"]["ATTRIBUTES"]["TEMPLATEFILE"] : null;
     //echo __METHOD__. '-' . __LINE__ . ' templateFile : ' . $this->templateFile . '<br />';
     $this->viewSet = isset($xmlArr["WEBPAGE"]["ATTRIBUTES"]["VIEWSET"]) ? $xmlArr["WEBPAGE"]["ATTRIBUTES"]["VIEWSET"] : null;
     $this->tab = isset($xmlArr["WEBPAGE"]["ATTRIBUTES"]["TAB"]) ? $xmlArr["WEBPAGE"]["ATTRIBUTES"]["TAB"] : null;
     $this->formRefs = new MetaIterator($xmlArr["WEBPAGE"]["FORMREFERENCES"]["REFERENCE"], "Openbizx\\Easy\\FormReference", $this);
     if ($xmlArr["WEBPAGE"]["FORMREFERENCELIBS"]) {
         $this->formRefLibs = new MetaIterator($xmlArr["WEBPAGE"]["FORMREFERENCELIBS"]["REFERENCE"], "Openbizx\\Easy\\FormReference", $this);
     }
     if ($xmlArr["WEBPAGE"]["WIDGETS"]) {
         $this->widgets = new MetaIterator($xmlArr["WEBPAGE"]["WIDGETS"]["REFERENCE"], "Openbizx\\Easy\\FormReference", $this);
     }
     $this->messageFile = isset($xmlArr["WEBPAGE"]["ATTRIBUTES"]["MESSAGEFILE"]) ? $xmlArr["WEBPAGE"]["ATTRIBUTES"]["MESSAGEFILE"] : null;
     $this->objectMessages = MessageHelper::loadMessage($this->messageFile, $this->package);
     $this->cacheLifeTime = isset($xmlArr["WEBPAGE"]["ATTRIBUTES"]["CACHELIFETIME"]) ? $xmlArr["WEBPAGE"]["ATTRIBUTES"]["CACHELIFETIME"] : "0";
     $this->readTile($xmlArr);
     // TODO: is this needed as title supports expression?
     $this->translate();
     // translate for multi-language support
     if (empty($this->title)) {
         $this->title = $this->objectDescription;
     }
 }
예제 #3
0
 /**
  * Read array meta data, and store to meta object
  *
  * @param array $xmlArr
  * @return void
  */
 protected function readMetadata(&$xmlArr)
 {
     parent::readMetaData($xmlArr);
     $this->dataObjName = $xmlArr["PLUGINSERVICE"]["ATTRIBUTES"]["DATAOBJECTNAME"];
     $this->dataObjName = $this->prefixPackage($this->dataObjName);
     $this->readMetaCollection($xmlArr["PLUGINSERVICE"]["DOTRIGGER"], $tmpList);
     if (!$tmpList) {
         return;
     }
     foreach ($tmpList as $triggerXml) {
         $this->dOTriggerList[] = new DOTrigger($triggerXml);
     }
 }
예제 #4
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);
     }
 }
예제 #5
0
 /**
  * Read array meta-data, and store to meta-object
  *
  * @param array $xmlArr
  * @return void
  */
 protected function readMetadata(&$xmlArr)
 {
     parent::readMetaData($xmlArr);
     $this->accounts = new MetaIterator($xmlArr["PLUGINSERVICE"]["ACCOUNTS"]["ACCOUNT"], "EmailAccount");
     $this->_logEnabled = $xmlArr["PLUGINSERVICE"]["LOGGING"]["ATTRIBUTES"]["ENABLED"];
     if ($this->_logEnabled) {
         $this->_logType = $xmlArr["PLUGINSERVICE"]["LOGGING"]["ATTRIBUTES"]["TYPE"];
         $this->_logObject = $xmlArr["PLUGINSERVICE"]["LOGGING"]["ATTRIBUTES"]["OBJECT"];
     }
 }
예제 #6
0
 /**
  * Read array meta data, and store to meta object
  *
  * @param array $xmlArr
  * @return void
  */
 protected function readMetadata(&$xmlArr)
 {
     parent::readMetaData($xmlArr);
     $level = strtoupper($xmlArr["PLUGINSERVICE"]["LOG_CONFIG"]["ATTRIBUTES"]["LEVEL"]);
     $this->_level = (int) $level;
     $this->_format = strtoupper($xmlArr["PLUGINSERVICE"]["LOG_CONFIG"]["ATTRIBUTES"]["FORMAT"]);
     $this->_org = strtoupper($xmlArr["PLUGINSERVICE"]["LOG_CONFIG"]["ATTRIBUTES"]["ORG"]);
     $this->_daystolive = $xmlArr["PLUGINSERVICE"]["LOG_CONFIG"]["ATTRIBUTES"]["DAYSTOLIVE"] ? strtoupper($xmlArr["PLUGINSERVICE"]["LOG_CONFIG"]["ATTRIBUTES"]["DAYSTOLIVE"]) : '0';
 }
예제 #7
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;
     }
 }
예제 #8
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};
 }
예제 #9
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;
     }
 }