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


PHP BizSystem::GetXmlFileWithPath方法代码示例

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


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

示例1: render

 /**
  * Render the chart output
  *
  * @param string $objName object name which is the bizform name
  * @return void
  */
 public function render($objName)
 {
     // get the value of the control that issues the call
     $chartName = BizSystem::clientProxy()->getFormInputs("__this");
     // get the current UI bizobj
     $formObj = BizSystem::getObject($objName);
     // get the existing bizform object
     $bizDataObj = $formObj->getDataObj();
     // get chart config xml file
     $chartXmlFile = BizSystem::GetXmlFileWithPath($objName . "_chart");
     $xmlArr = BizSystem::getXmlArray($chartXmlFile);
     ob_clean();
     // get the chart section from config xml file
     foreach ($xmlArr["BIZFORM_CHART"]["CHARTLIST"]["CHART"] as $chart) {
         if (count($xmlArr["BIZFORM_CHART"]["CHARTLIST"]["CHART"]) == 1) {
             $chart = $xmlArr["BIZFORM_CHART"]["CHARTLIST"]["CHART"];
         }
         // try to match the chartName, if no chartName given, always draw the first chart defined in xml file
         if ($chartName && $chart["ATTRIBUTES"]["NAME"] == $chartName || !$chartName) {
             if ($chart["ATTRIBUTES"]["GRAPHTYPE"] == 'XY') {
                 $this->xyGraphRender($bizDataObj, $chart);
                 break;
             }
             if ($chart["ATTRIBUTES"]["GRAPHTYPE"] == 'Pie') {
                 $this->pieGraphRender($bizDataObj, $chart);
                 break;
             }
         }
     }
 }
开发者ID:que273,项目名称:siremis,代码行数:36,代码来源:chartService.php

示例2: getMetadataArray

 private function getMetadataArray($objName)
 {
     $xmlFile = BizSystem::GetXmlFileWithPath($objName);
     if (!$xmlFile) {
         $dotPos = strrpos($objName, ".");
         $package = $dotPos > 0 ? substr($objName, 0, $dotPos) : null;
         $class = $dotPos > 0 ? substr($objName, $dotPos + 1) : $objName;
     } else {
         $xmlArr = BizSystem::getXmlArray($xmlFile);
     }
     if ($xmlArr) {
         $keys = array_keys($xmlArr);
         $root = $keys[0];
         // add by mr_a_ton , atrubut name must match with object name
         $dotPos = strrpos($objName, ".");
         $shortObjectName = $dotPos > 0 ? substr($objName, $dotPos + 1) : $objName;
         if ($xmlArr[$root]["ATTRIBUTES"]["NAME"] == "") {
             $xmlArr[$root]["ATTRIBUTES"]["NAME"] = $shortObjectName;
         } else {
             if ($shortObjectName != $xmlArr[$root]["ATTRIBUTES"]["NAME"]) {
                 trigger_error("Metadata file parsing error for object {$objName}. Name attribut [" . $xmlArr[$root]["ATTRIBUTES"]["NAME"] . "] not same with object name. Please double check your metadata xml file again.", E_USER_ERROR);
             }
         }
         //$package = $xmlArr[$root]["ATTRIBUTES"]["PACKAGE"];
         $class = $xmlArr[$root]["ATTRIBUTES"]["CLASS"];
         // if class has package name as prefix, change the package to the prefix
         $dotPos = strrpos($class, ".");
         $classPrefix = $dotPos > 0 ? substr($class, 0, $dotPos) : null;
         $classPackage = $classPrefix ? $classPrefix : null;
         if ($classPrefix) {
             $class = substr($class, $dotPos + 1);
         }
         // set object package
         $dotPos = strrpos($objName, ".");
         $package = $dotPos > 0 ? substr($objName, 0, $dotPos) : null;
         if (!$classPackage) {
             $classPackage = $package;
         }
         $xmlArr[$root]["ATTRIBUTES"]["PACKAGE"] = $package;
         return $xmlArr;
     }
     return;
 }
开发者ID:Why-Not-Sky,项目名称:cubi-ng,代码行数:43,代码来源:compileService.php

示例3: getXMLFromList

 protected function getXMLFromList($selectFrom)
 {
     $pos0 = strpos($selectFrom, "(");
     $pos1 = strpos($selectFrom, ")");
     if ($pos0 > 0 && $pos1 > $pos0) {
         // select from xml file
         $xmlFile = substr($selectFrom, 0, $pos0);
         $tag = substr($selectFrom, $pos0 + 1, $pos1 - $pos0 - 1);
         $tag = strtoupper($tag);
         $xmlFile = BizSystem::GetXmlFileWithPath($xmlFile);
         if (!$xmlFile) {
             return false;
         }
         $xmlArr =& BizSystem::getXmlArray($xmlFile);
         if ($xmlArr) {
             $i = 0;
             if (!key_exists($tag, $xmlArr["SELECTION"])) {
                 return false;
             }
             foreach ($xmlArr["SELECTION"][$tag] as $node) {
                 $list[$i]['val'] = $node["ATTRIBUTES"]["VALUE"];
                 $list[$i]['pic'] = $node["ATTRIBUTES"]["PICTURE"];
                 if ($node["ATTRIBUTES"]["TEXT"]) {
                     $list[$i]['txt'] = $node["ATTRIBUTES"]["TEXT"];
                 } else {
                     $list[$i]['txt'] = $list[$i]['val'];
                 }
                 $i++;
             }
             $list = $this->translateList($list, $tag);
             // supprot multi-language
         }
         return $list;
     }
     return false;
 }
开发者ID:Why-Not-Sky,项目名称:cubi-ng,代码行数:36,代码来源:lovService.php

示例4: _runDOTrigger

 /**
  * Run DataObject trigger
  *
  * @param string $triggerType type of the trigger
  */
 private function _runDOTrigger($triggerType)
 {
     // locate the trigger metadata file BOName_Trigger.xml
     $triggerServiceName = $this->m_Name . "_Trigger";
     $xmlFile = BizSystem::GetXmlFileWithPath($triggerServiceName);
     if (!$xmlFile) {
         return;
     }
     $triggerService = BizSystem::getObject($triggerServiceName);
     if ($triggerService == null) {
         return;
     }
     // invoke trigger service ExecuteTrigger($triggerType, $currentRecord)
     $triggerService->execute($this, $triggerType);
 }
开发者ID:que273,项目名称:siremis,代码行数:20,代码来源:BizDataObj.php

示例5: getUserPreference

 /**
  * Get user preference
  * 
  * @param string $attribute key that representing attribute
  * @return mixed 
  */
 public static function getUserPreference($attribute = null)
 {
     if (!BizSystem::GetXmlFileWithPath(PREFERENCE_SERVICE)) {
         return null;
     }
     $preferenceService = BizSystem::getService(PREFERENCE_SERVICE);
     if (method_exists($preferenceService, 'getPreference')) {
         return $preferenceService->getPreference($attribute);
     } else {
         $preference = BizSystem::sessionContext()->getVar("_USER_PREFERENCE");
         return isset($preference[$attribute]) ? $preference[$attribute] : "";
     }
 }
开发者ID:Why-Not-Sky,项目名称:cubi-ng,代码行数:19,代码来源:BizSystem.php

示例6: __construct

 /**
  * Read Config.xml into a internal array.
  */
 public function __construct()
 {
     $xmlFile = BizSystem::GetXmlFileWithPath("Config");
     $this->_xmlArr =& BizSystem::getXmlArray($xmlFile);
 }
开发者ID:que273,项目名称:siremis,代码行数:8,代码来源:Configuration.php

示例7: constructObject

 /**
  * Construct an instance of an object
  *
  * @param string $objName object name
  * @param array $xmlArr xml array
  * @return object the instance of the object
  */
 protected function constructObject($objName, &$xmlArr = null)
 {
     if (!$xmlArr) {
         $xmlFile = BizSystem::GetXmlFileWithPath($objName);
         if (!$xmlFile) {
             $dotPos = strrpos($objName, ".");
             $package = $dotPos > 0 ? substr($objName, 0, $dotPos) : null;
             $class = $dotPos > 0 ? substr($objName, $dotPos + 1) : $objName;
         } else {
             $xmlArr = BizSystem::getXmlArray($xmlFile);
         }
     }
     if ($xmlArr) {
         $keys = array_keys($xmlArr);
         $root = $keys[0];
         // add by mr_a_ton , atrubut name must match with object name
         $dotPos = strrpos($objName, ".");
         $shortObjectName = $dotPos > 0 ? substr($objName, $dotPos + 1) : $objName;
         if ($xmlArr[$root]["ATTRIBUTES"]["NAME"] == "") {
             $xmlArr[$root]["ATTRIBUTES"]["NAME"] = $shortObjectName;
         } else {
             if ($shortObjectName != $xmlArr[$root]["ATTRIBUTES"]["NAME"]) {
                 trigger_error("Metadata file parsing error for object {$objName}. Name attribut [" . $xmlArr[$root]["ATTRIBUTES"]["NAME"] . "] not same with object name. Please double check your metadata xml file again.", E_USER_ERROR);
             }
         }
         //$package = $xmlArr[$root]["ATTRIBUTES"]["PACKAGE"];
         $class = $xmlArr[$root]["ATTRIBUTES"]["CLASS"];
         // if class has package name as prefix, change the package to the prefix
         $dotPos = strrpos($class, ".");
         $classPrefix = $dotPos > 0 ? substr($class, 0, $dotPos) : null;
         $classPackage = $classPrefix ? $classPrefix : null;
         if ($classPrefix) {
             $class = substr($class, $dotPos + 1);
         }
         // set object package
         $dotPos = strrpos($objName, ".");
         $package = $dotPos > 0 ? substr($objName, 0, $dotPos) : null;
         if (strpos($package, '@') === 0) {
             $package = substr($package, 1);
         }
         if (!$classPackage) {
             $classPackage = $package;
         }
         $xmlArr[$root]["ATTRIBUTES"]["PACKAGE"] = $package;
     }
     if ($class == "BizObj") {
         // convert BizObj to BizDataObj, support <1.2 version
         $class = "BizDataObj";
     }
     if (!class_exists($class, false)) {
         $classFile = BizClassLoader::getLibFileWithPath($class, $classPackage);
         if (!$classFile) {
             if ($package) {
                 trigger_error("Cannot find the class with name as {$package}.{$class}", E_USER_ERROR);
             } else {
                 trigger_error("Cannot find the class with name as {$class} of {$objName}", E_USER_ERROR);
             }
             exit;
         }
         include_once $classFile;
     }
     if (class_exists($class, false)) {
         //if ($objName == "collab.calendar.form.EventListForm") { print_r($xmlArr); exit; }
         $obj_ref = new $class($xmlArr);
         if ($obj_ref) {
             return $obj_ref;
         }
     } else {
         if (function_exists("ioncube_read_file")) {
             $data = ioncube_read_file($classFile);
             if (!strpos($data, "ionCube Loader")) {
                 trigger_error("Cannot find the class with name as {$class} in {$classFile}", E_USER_ERROR);
             } else {
             }
         }
     }
     return null;
 }
开发者ID:Why-Not-Sky,项目名称:cubi-ng,代码行数:85,代码来源:ObjectFactory.php

示例8: getFromList

 /**
  * Get from list
  *
  * @param array $list
  * @return <type>
  */
 public function getFromList(&$list)
 {
     $selectFrom = $this->getSelectFrom();
     // from XML file (Selection)
     $pos0 = strpos($selectFrom, "(");
     $pos1 = strpos($selectFrom, ")");
     if ($pos0 > 0 && $pos1 > $pos0) {
         // select from xml file
         $xmlFile = substr($selectFrom, 0, $pos0);
         $tag = substr($selectFrom, $pos0 + 1, $pos1 - $pos0 - 1);
         $tag = strtoupper($tag);
         $xmlFile = BizSystem::GetXmlFileWithPath($xmlFile);
         if (!$xmlFile) {
             return;
         }
         $xmlArr =& BizSystem::getXmlArray($xmlFile);
         if ($xmlArr) {
             $i = 0;
             if (!key_exists($tag, $xmlArr["SELECTION"])) {
                 return;
             }
             foreach ($xmlArr["SELECTION"][$tag] as $node) {
                 $list[$i]['val'] = $node["ATTRIBUTES"]["VALUE"];
                 if ($node["ATTRIBUTES"]["TEXT"]) {
                     $list[$i]['txt'] = I18n::getInstance()->translate($node["ATTRIBUTES"]["TEXT"]);
                 } else {
                     $list[$i]['txt'] = I18n::getInstance()->translate($list[$i]['val']);
                 }
                 $i++;
             }
         }
         return;
     }
     // from Database
     $pos0 = strpos($selectFrom, "[");
     $pos1 = strpos($selectFrom, "]");
     if ($pos0 > 0 && $pos1 > $pos0) {
         // select from bizObj
         // support BizObjName[BizFieldName] or BizObjName[BizFieldName4Text:BizFieldName4Value]
         $bizObjName = substr($selectFrom, 0, $pos0);
         $pos3 = strpos($selectFrom, ":");
         if ($pos3 > $pos0 && $pos3 < $pos1) {
             $fieldName = substr($selectFrom, $pos0 + 1, $pos3 - $pos0 - 1);
             $fieldName_v = substr($selectFrom, $pos3 + 1, $pos1 - $pos3 - 1);
         } else {
             $fieldName = substr($selectFrom, $pos0 + 1, $pos1 - $pos0 - 1);
             $fieldName_v = $fieldName;
         }
         $this->m_SelectFieldName = $fieldName;
         $commaPos = strpos($selectFrom, ",", $pos1);
         $commaPos2 = strpos($selectFrom, ",", $commaPos + 1);
         if ($commaPos > $pos1) {
             if ($commaPos2) {
                 $searchRule = trim(substr($selectFrom, $commaPos + 1, $commaPos2 - $commaPos - 1));
             } else {
                 $searchRule = trim(substr($selectFrom, $commaPos + 1));
             }
         }
         if ($commaPos2 > $commaPos) {
             $rootSearchRule = trim(substr($selectFrom, $commaPos2 + 1));
         }
         $bizObj = BizSystem::getObject($bizObjName);
         if (!$bizObj) {
             return;
         }
         $recList = array();
         $oldAssoc = $bizObj->m_Association;
         $bizObj->m_Association = null;
         if ($searchRule) {
             $searchRule = Expression::evaluateExpression($searchRule, $this->getFormObj());
         }
         if ($rootSearchRule) {
             $rootSearchRule = Expression::evaluateExpression($rootSearchRule, $this->getFormObj());
         } else {
             $rootSearchRule = "[PId]=0 OR [PId]='' OR [PId] is NULL";
         }
         $recListTree = $bizObj->fetchTree($rootSearchRule, 100, $searchRule);
         $bizObj->m_Association = $oldAssoc;
         if (!$recListTree) {
             return;
         }
         // bugfix : error if data blank
         foreach ($recListTree as $recListTreeNode) {
             $this->tree2array($recListTreeNode, $recList);
         }
         foreach ($recList as $rec) {
             $list[$i]['val'] = $rec[$fieldName_v];
             $list[$i]['txt'] = $rec[$fieldName];
             $i++;
         }
         return;
     }
     // in case of a|b|c
     $recList = explode('|', $selectFrom);
//.........这里部分代码省略.........
开发者ID:que273,项目名称:siremis,代码行数:101,代码来源:TreeListbox.php

示例9: getFromList

 /**
  * Get Select from list
  * @param array $list output array
  * @return void
  */
 public function getFromList(&$list)
 {
     $selFrom = $this->getSelectFrom();
     $pos0 = strpos($selFrom, "(");
     $pos1 = strpos($selFrom, ")");
     $sql_rules = strstr($selFrom, ',');
     if ($pos0 > 0 && $pos1 > $pos0 && $sql_rules == FALSE) {
         // select from xml file
         $xmlFile = substr($selFrom, 0, $pos0);
         $tag = substr($selFrom, $pos0 + 1, $pos1 - $pos0 - 1);
         $tag = strtoupper($tag);
         $xmlFile = BizSystem::GetXmlFileWithPath($xmlFile);
         if (!$xmlFile) {
             return;
         }
         $xmlArr =& BizSystem::getXmlArray($xmlFile);
         if ($xmlArr) {
             $i = 0;
             if (!key_exists($tag, $xmlArr["SELECTION"])) {
                 return;
             }
             foreach ($xmlArr["SELECTION"][$tag] as $node) {
                 $list[$i]['val'] = $node["ATTRIBUTES"]["VALUE"];
                 if ($node["ATTRIBUTES"]["TEXT"]) {
                     $list[$i]['txt'] = I18n::getInstance()->translate($node["ATTRIBUTES"]["TEXT"]);
                 } else {
                     $list[$i]['txt'] = I18n::getInstance()->translate($list[$i]['val']);
                 }
                 $i++;
             }
         }
         return;
     }
     $pos0 = strpos($selFrom, "[");
     $pos1 = strpos($selFrom, "]");
     if ($pos0 > 0 && $pos1 > $pos0) {
         // select from bizObj
         // support BizObjName[BizFieldName] or BizObjName[BizFieldName4Text:BizFieldName4Value]
         $bizobjName = substr($selFrom, 0, $pos0);
         $pos3 = strpos($selFrom, ":");
         if ($pos3 > $pos0 && $pos3 < $pos1) {
             $fldName = substr($selFrom, $pos0 + 1, $pos3 - $pos0 - 1);
             $fldName_v = substr($selFrom, $pos3 + 1, $pos1 - $pos3 - 1);
         } else {
             $fldName = substr($selFrom, $pos0 + 1, $pos1 - $pos0 - 1);
             $fldName_v = $fldName;
         }
         $pos_comma = strpos($selFrom, ",", $pos1);
         if ($pos_comma > $pos1) {
             $searchRule = trim(substr($selFrom, $pos_comma + 1));
         }
         global $g_BizSystem;
         $bizobj = BizSystem::getObject($bizobjName);
         if (!$bizobj) {
             return;
         }
         $recList = array();
         $old_assoc = $bizobj->m_Association;
         $bizobj->m_Association = null;
         $recList = $bizobj->directFetch($searchRule);
         $bizobj->m_Association = $old_assoc;
         foreach ($recList as $rec) {
             $list[$i]['val'] = $rec[$fldName_v];
             $list[$i]['txt'] = $rec[$fldName];
             $i++;
         }
         return;
     }
     // in case of a|b|c
     $recList = explode('|', $selFrom);
     foreach ($recList as $rec) {
         $list[$i]['val'] = $rec;
         $list[$i]['txt'] = $rec;
         $i++;
     }
     return;
 }
开发者ID:que273,项目名称:siremis,代码行数:82,代码来源:HTMLControl.php

示例10: getFromList

 /**
  * Get from list
  *
  * @param array $list
  * @return void
  */
 public function getFromList(&$list, $selectFrom = null)
 {
     if (!$selectFrom) {
         $selectFrom = $this->getSelectFrom();
     }
     if (!$selectFrom) {
         return $this->getSQLFromList($list);
     }
     $pos0 = strpos($selectFrom, "(");
     $pos1 = strpos($selectFrom, ")");
     if ($pos0 > 0 && $pos1 > $pos0) {
         // select from xml file
         $xmlFile = substr($selectFrom, 0, $pos0);
         $tag = substr($selectFrom, $pos0 + 1, $pos1 - $pos0 - 1);
         $tag = strtoupper($tag);
         $xmlFile = BizSystem::GetXmlFileWithPath($xmlFile);
         if (!$xmlFile) {
             return;
         }
         $xmlArr =& BizSystem::getXmlArray($xmlFile);
         if ($xmlArr) {
             $i = 0;
             if (!key_exists($tag, $xmlArr["SELECTION"])) {
                 return;
             }
             foreach ($xmlArr["SELECTION"][$tag] as $node) {
                 $list[$i]['val'] = $node["ATTRIBUTES"]["VALUE"];
                 $list[$i]['pic'] = $node["ATTRIBUTES"]["PICTURE"];
                 if ($node["ATTRIBUTES"]["TEXT"]) {
                     $list[$i]['txt'] = $node["ATTRIBUTES"]["TEXT"];
                 } else {
                     $list[$i]['txt'] = $list[$i]['val'];
                 }
                 $i++;
             }
             $this->translateList($list, $tag);
             // supprot multi-language
         }
         return;
     }
     $pos0 = strpos($selectFrom, "[");
     $pos1 = strpos($selectFrom, "]");
     if ($pos0 > 0 && $pos1 > $pos0) {
         // select from bizObj
         // support BizObjName[BizFieldName] or
         // BizObjName[BizFieldName4Text:BizFieldName4Value] or
         // BizObjName[BizFieldName4Text:BizFieldName4Value:BizFieldName4Pic]
         $bizObjName = substr($selectFrom, 0, $pos0);
         $pos3 = strpos($selectFrom, ":");
         if ($pos3 > $pos0 && $pos3 < $pos1) {
             $fieldName = substr($selectFrom, $pos0 + 1, $pos3 - $pos0 - 1);
             $fieldName_v = substr($selectFrom, $pos3 + 1, $pos1 - $pos3 - 1);
         } else {
             $fieldName = substr($selectFrom, $pos0 + 1, $pos1 - $pos0 - 1);
             $fieldName_v = $fieldName;
         }
         $pos4 = strpos($fieldName_v, ":");
         if ($pos4) {
             $fieldName_v_mixed = $fieldName_v;
             $fieldName_v = substr($fieldName_v_mixed, 0, $pos4);
             $fieldName_p = substr($fieldName_v_mixed, $pos4 + 1, strlen($fieldName_v_mixed) - $pos4 - 1);
             unset($fieldName_v_mixed);
         }
         $commaPos = strpos($selectFrom, ",", $pos1);
         if ($commaPos > $pos1) {
             $searchRule = trim(substr($selectFrom, $commaPos + 1));
         }
         $bizObj = BizSystem::getObject($bizObjName);
         if (!$bizObj) {
             return;
         }
         $recList = array();
         $oldAssoc = $bizObj->m_Association;
         $bizObj->m_Association = null;
         $recList = $bizObj->directFetch($searchRule);
         $bizObj->m_Association = $oldAssoc;
         foreach ($recList as $rec) {
             $list[$i]['val'] = $rec[$fieldName_v];
             $list[$i]['txt'] = $rec[$fieldName];
             $list[$i]['pic'] = $rec[$fieldName_p];
             $i++;
         }
         return;
     }
     // in case of a|b|c
     $recList = explode('|', $selectFrom);
     foreach ($recList as $rec) {
         $list[$i]['val'] = $rec;
         $list[$i]['txt'] = $rec;
         $list[$i]['pic'] = $rec;
         $i++;
     }
     return;
 }
开发者ID:que273,项目名称:siremis,代码行数:100,代码来源:OptionElement.php

示例11: getFromList

 public function getFromList(&$list)
 {
     $selectFrom = $this->getSelectFrom();
     $pos0 = strpos($selectFrom, "(");
     $pos1 = strpos($selectFrom, ")");
     if ($pos0 > 0 && $pos1 > $pos0) {
         // select from xml file
         $xmlFile = substr($selectFrom, 0, $pos0);
         $tag = substr($selectFrom, $pos0 + 1, $pos1 - $pos0 - 1);
         $tag = strtoupper($tag);
         $xmlFile = BizSystem::GetXmlFileWithPath($xmlFile);
         if (!$xmlFile) {
             return;
         }
         $xmlArr =& BizSystem::getXmlArray($xmlFile);
         if ($xmlArr) {
             $i = 0;
             if (!key_exists($tag, $xmlArr["SELECTION"])) {
                 return;
             }
             foreach ($xmlArr["SELECTION"][$tag] as $node) {
                 $list[$i]['val'] = $node["ATTRIBUTES"]["VALUE"];
                 if ($node["ATTRIBUTES"]["TEXT"]) {
                     $list[$i]['txt'] = I18n::getInstance()->translate($node["ATTRIBUTES"]["TEXT"]);
                 } else {
                     $list[$i]['txt'] = I18n::getInstance()->translate($list[$i]['val']);
                 }
                 $i++;
             }
         }
         return;
     }
     $pos0 = strpos($selectFrom, "[");
     $pos1 = strpos($selectFrom, "]");
     if ($pos0 > 0 && $pos1 > $pos0) {
         // select from bizObj
         // support BizObjName[BizFieldName] or BizObjName[BizFieldName4Text:BizFieldName4Value]
         $bizObjName = substr($selectFrom, 0, $pos0);
         $pos3 = strpos($selectFrom, ":");
         if ($pos3 > $pos0 && $pos3 < $pos1) {
             $fieldName = substr($selectFrom, $pos0 + 1, $pos3 - $pos0 - 1);
             $fieldName_v = substr($selectFrom, $pos3 + 1, $pos1 - $pos3 - 1);
         } else {
             $fieldName = substr($selectFrom, $pos0 + 1, $pos1 - $pos0 - 1);
             $fieldName_v = $fieldName;
         }
         $this->m_SelectFieldName = $fieldName;
         $commaPos = strpos($selectFrom, ",", $pos1);
         if ($commaPos > $pos1) {
             $searchRule = trim(substr($selectFrom, $commaPos + 1));
         }
         $bizObj = BizSystem::getObject($bizObjName);
         if (!$bizObj) {
             return;
         }
         $recList = array();
         $oldAssoc = $bizObj->m_Association;
         $bizObj->m_Association = null;
         $recListTree = array();
         $bizObj->fetchNodePath("[PId]='" . $this->getValue() . "'", $recListTree);
         $level = 0;
         foreach ($recListTree as $recListTreeNode) {
             $this->tree2array($recListTreeNode, $recList, $level);
             $level++;
         }
         $bizObj->m_Association = $oldAssoc;
         foreach ($recList as $rec) {
             $list[$i]['val'] = $rec[$fieldName_v];
             $list[$i]['txt'] = $rec[$fieldName];
             $i++;
         }
         return;
     }
     // in case of a|b|c
     $recList = explode('|', $selectFrom);
     foreach ($recList as $rec) {
         $list[$i]['val'] = $rec;
         $list[$i]['txt'] = $rec;
         $i++;
     }
     return;
 }
开发者ID:que273,项目名称:siremis,代码行数:82,代码来源:TreeLabelText.php


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