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


PHP Openbiz::objectFactory方法代码示例

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


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

示例1: __construct

 public function __construct()
 {
     Openbiz::$app = $this;
     //$this->isInitialized = true;
     // preInit
     // registerErrorHandlers
     // registerCoreComponent
     $this->request = new Request($this);
     $this->initSystemDefaultTimezone();
     // define default class alias
     $classAliases = ['BizDataObj' => 'Openbiz\\Data\\BizDataObj', 'BizField' => 'Openbiz\\Data\\BizField', 'EasyForm' => 'Openbiz\\Easy\\EasyForm', 'WebPage' => 'Openbiz\\Easy\\WebPage', 'PickerForm' => 'Openbiz\\Easy\\PickerForm', 'FormReference' => 'Openbiz\\Easy\\FormReference', 'AutoSuggest' => 'Openbiz\\Easy\\Element\\AutoSuggest', 'BarcodeScanner' => 'Openbiz\\Easy\\Element\\BarcodeScanner', 'Button' => 'Openbiz\\Easy\\Element\\Button', 'Checkbox' => 'Openbiz\\Easy\\Element\\Checkbox', 'CheckListbox' => 'Openbiz\\Easy\\Element\\CheckListbox', 'CKEditor' => 'Openbiz\\Easy\\Element\\CKEditor', 'ColorPicker' => 'Openbiz\\Easy\\Element\\ColorPicker', 'ColumnBar' => 'Openbiz\\Easy\\Element\\ColumnBar', 'ColumnBool' => 'Openbiz\\Easy\\Element\\ColumnBool', 'ColumnHidden' => 'Openbiz\\Easy\\Element\\ColumnHidden', 'ColumnImage' => 'Openbiz\\Easy\\Element\\ColumnImage', 'ColumnInputText' => 'Openbiz\\Easy\\Element\\ColumnInputText', 'ColumnList' => 'Openbiz\\Easy\\Element\\ColumnList', 'ColumnListbox' => 'Openbiz\\Easy\\Element\\ColumnListbox', 'ColumnPassword' => 'Openbiz\\Easy\\Element\\ColumnPassword', 'ColumnShare' => 'Openbiz\\Easy\\Element\\ColumnShare', 'ColumnSorting' => 'Openbiz\\Easy\\Element\\ColumnSorting', 'ColumnStyle' => 'Openbiz\\Easy\\Element\\ColumnStyle', 'ColumnText' => 'Openbiz\\Easy\\Element\\ColumnText', 'ColumnValue' => 'Openbiz\\Easy\\Element\\ColumnValue', 'DropDownList' => 'Openbiz\\Easy\\Element\\DropDownList', 'EditCombobox' => 'Openbiz\\Easy\\Element\\EditCombobox', 'Element' => 'Openbiz\\Easy\\Element\\Element', 'EventHandler' => 'Openbiz\\Easy\\Element\\EventHandler', 'File' => 'Openbiz\\Easy\\Element\\File', 'FileInput' => 'Openbiz\\Easy\\Element\\FileInput', 'FileUploader' => 'Openbiz\\Easy\\Element\\FileUploader', 'FormElement' => 'Openbiz\\Easy\\Element\\FormElement', 'Hidden' => 'Openbiz\\Easy\\Element\\Hidden', 'HTMLBlock' => 'Openbiz\\Easy\\Element\\HTMLBlock', 'HTMLButton' => 'Openbiz\\Easy\\Element\\HTMLButton', 'HTMLPreview' => 'Openbiz\\Easy\\Element\\HTMLPreview', 'IDCardReader' => 'Openbiz\\Easy\\Element\\IDCardReader', 'IFrameBox' => 'Openbiz\\Easy\\Element\\IFrameBox', 'ImageSelector' => 'Openbiz\\Easy\\Element\\ImageUploader', 'ImageUploader' => 'Openbiz\\Easy\\Element\\ImageUploader', 'InputDate' => 'Openbiz\\Easy\\Element\\InputDate', 'InputDateRangePicker' => 'Openbiz\\Easy\\Element\\InputDateRangePicker', 'InputDatetime' => 'Openbiz\\Easy\\Element\\InputDatetime', 'InputElement' => 'Openbiz\\Easy\\Element\\InputElement', 'InputPassword' => 'Openbiz\\Easy\\Element\\InputPassword', 'InputPicker' => 'Openbiz\\Easy\\Element\\InputPicker', 'InputText' => 'Openbiz\\Easy\\Element\\InputText', 'LabelBack' => 'Openbiz\\Easy\\Element\\LabelBack', 'LabelBar' => 'Openbiz\\Easy\\Element\\LabelBar', 'LabelBool' => 'Openbiz\\Easy\\Element\\LabelBool', 'LabelImage' => 'Openbiz\\Easy\\Element\\LabelImage', 'LabelList' => 'Openbiz\\Easy\\Element\\LabelList', 'LabelPassword' => 'Openbiz\\Easy\\Element\\LabelPassword', 'LabelText' => 'Openbiz\\Easy\\Element\\LabelText', 'LabelTextarea' => 'Openbiz\\Easy\\Element\\LabelTextarea', 'LabelTextPaging' => 'Openbiz\\Easy\\Element\\LabelTextPaging', 'Listbox' => 'Openbiz\\Easy\\Element\\Listbox', 'OptionElement' => 'Openbiz\\Easy\\Element\\OptionElement', 'PageSelector' => 'Openbiz\\Easy\\Element\\PageSelector', 'PagesizeSelector' => 'Openbiz\\Easy\\Element\\PagesizeSelector', 'Password' => 'Openbiz\\Easy\\Element\\Password', 'Radio' => 'Openbiz\\Easy\\Element\\Radio', 'RawData' => 'Openbiz\\Easy\\Element\\RawData', 'ResetButton' => 'Openbiz\\Easy\\Element\\ResetButton', 'RichText' => 'Openbiz\\Easy\\Element\\RichText', 'RowCheckbox' => 'Openbiz\\Easy\\Element\\RowCheckbox', 'Spacer' => 'Openbiz\\Easy\\Element\\Spacer', 'SubmitButton' => 'Openbiz\\Easy\\Element\\SubmitButton', 'Textarea' => 'Openbiz\\Easy\\Element\\Textarea', 'TreeLabelText' => 'Openbiz\\Easy\\Element\\TreeLabelText', 'TreeListbox' => 'Openbiz\\Easy\\Element\\TreeListbox'];
     Openbiz::objectFactory()->setClassAliases($classAliases);
 }
开发者ID:openbizx,项目名称:openbizx-cubix,代码行数:13,代码来源:Application.php

示例2: __construct

 /**
  * Contructor of class
  *
  * @param array $xmlArr
  * @param string $childClassName
  * @param object $parentObj
  * @return void
  */
 public function __construct(&$xmlArr, $childClassName, $parentObj = null)
 {
     $this->parentObj = $parentObj;
     if (!$xmlArr) {
         return;
     }
     if (isset($xmlArr["ATTRIBUTES"])) {
         $className = isset($xmlArr["ATTRIBUTES"]['CLASS']) ? $xmlArr["ATTRIBUTES"]['CLASS'] : $childClassName;
         if ((bool) strpos($className, ".")) {
             $a_package_name = explode(".", $className);
             $className = array_pop($a_package_name);
             $clsLoaded = ClassLoader::loadMetadataClass($className, implode(".", $a_package_name));
         }
         //if (!$clsLoaded) trigger_error("Cannot find the load class $className", E_USER_ERROR);
         $className = Openbiz::objectFactory()->getClassNameFromAlias($className);
         $obj = new $className($xmlArr, $parentObj);
         $this->varValue[$obj->objectName] = $obj;
     } else {
         foreach ($xmlArr as $child) {
             $className = isset($child["ATTRIBUTES"]['CLASS']) ? $child["ATTRIBUTES"]['CLASS'] : $childClassName;
             /**
              * If a '.' is found within className we need to require such class
              * and then get the className after the last dot
              * ex. shared.dataobjs.FieldName, in this case FieldName is the class, shared/dataobjs the path
              *
              * The best solution to this is enable object factory to specify its resulting object constructor parameters
              */
             if ($className) {
                 //bug fixed by jixian for resolve load an empty classname
                 if ((bool) strpos($className, ".")) {
                     $a_package_name = explode(".", $className);
                     $className = array_pop($a_package_name);
                     $clsLoaded = ClassLoader::loadMetadataClass($className, implode(".", $a_package_name));
                 } elseif ($parentObj->package) {
                     $clsLoaded = ClassLoader::loadMetadataClass($className, $parentObj->package);
                 }
                 $className = Openbiz::objectFactory()->getClassNameFromAlias($className);
                 $obj = new $className($child, $parentObj);
                 $this->varValue[$obj->objectName] = $obj;
             }
         }
     }
 }
开发者ID:openbizx,项目名称:openbizx-cubix,代码行数:51,代码来源:MetaIterator.php

示例3: saveSessionObjects

 /**
  * Save session variables of all stateful objects into sessionid_obj file
  *
  * @return void
  * */
 public function saveSessionObjects()
 {
     // loop all objects (bizview, bizform, bizdataobj) collect their session vars
     $allobjs = Openbiz::objectFactory()->getAllObjects();
     foreach ($allobjs as $obj) {
         if (method_exists($obj, "saveStatefullVars")) {
             //after calling $obj->saveStatefullVars SessObjArr and StatefulSessObjArr are filled
             $obj->saveStatefullVars($this);
         }
         // if previous view's object is used in current view, don't discard its session data
         if (isset($obj->objectName) && isset($this->_prevViewObjNames[$obj->objectName])) {
             unset($this->_prevViewObjNames[$obj->objectName]);
             Openbiz::$app->getLog()->log(LOG_ERR, "SESSION", "unset " . $obj->objectName);
         }
     }
     // discard useless previous view's session objects
     //foreach($this->_prevViewObjNames as $objName=>$tmp)
     //    unset($this->_sessObjArr[$objName]);
     $this->_sessObjArr["ViewHist"] = $this->_viewHistory;
     $this->setVar(OB_TRANSIENT_DATA_SESSION_INDEX, $this->_sessObjArr);
     $this->setVar(OB_STATEFUL_DATA_SESSION_INDEX, $this->_statefulSessObjArr);
 }
开发者ID:openbizx,项目名称:openbizx-cubix,代码行数:27,代码来源:SessionContext.php


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