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


PHP BizSystem::GetObject方法代码示例

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


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

示例1: SetSearchRule

 public function SetSearchRule()
 {
     $url = $this->GetURL();
     if (!$url) {
         return;
     }
     //search cat_id from mapping table
     $mappingObj = BizSystem::GetObject($this->m_CategoryMappingDO, 1);
     //@todo: $url need to be filtered before use in database
     $records = $mappingObj->directFetch("[url]='{$url}'");
     if (count($records) == 1) {
         $cat_id = (int) $records[0]['cat_id'];
     } else {
         //if no matched, generate record from category table url_match
         $categoryObj = BizSystem::GetObject($this->m_CategoryDO, 1);
         $records = $categoryObj->directFetch();
         foreach ($records as $record) {
             $match = $record['url_match'];
             if ($match) {
                 $pattern = "/" . str_replace('/', '\\/', $match) . "/si";
                 $pattern = "@" . $match . "@si";
                 if (preg_match($pattern, "/" . $url)) {
                     $cat_id = $record['Id'];
                     //cache it into database;
                     $obj_array = array("cat_id" => $cat_id, "url" => $url);
                     $mappingObj->insertRecord($obj_array);
                     break;
                 }
             }
         }
     }
     $this->m_SearchRule = "[category_id]='{$cat_id}'";
 }
开发者ID:que273,项目名称:siremis,代码行数:33,代码来源:HelpWidgetForm.php

示例2: UpdateRecord

 public function UpdateRecord()
 {
     $result = parent::UpdateRecord();
     $mappingObj = BizSystem::GetObject($this->m_CategoryMappingDO, 1);
     $Id = $this->m_RecordId;
     $mappingObj->deleteRecords("[cat_id]='{$Id}'");
     return $result;
 }
开发者ID:que273,项目名称:siremis,代码行数:8,代码来源:HelpCategoryForm.php

示例3: getDefaultMainForm

 public function getDefaultMainForm(&$xmlArr)
 {
     $newForm = array("ATTRIBUTES" => array("NAME" => $this->m_FormSelector), "VALUE" => null);
     $xmlArr = $newForm;
     $formObj = BizSystem::GetObject($this->m_FormSelector);
     if (!$formObj) {
         return;
     }
     $targetForm = $formObj->getViewMode();
     $newForm = array("ATTRIBUTES" => array("NAME" => $targetForm), "VALUE" => null);
     $newArr = array($xmlArr, $newForm);
     return $newArr;
 }
开发者ID:Why-Not-Sky,项目名称:cubi-ng,代码行数:13,代码来源:SelectorView.php

示例4: switchViewMode

 public function switchViewMode()
 {
     if (!$this->lastViewMode) {
         $this->lastViewMode = $this->getViewMode();
     }
     $viewObj = $this->getViewObject();
     //$viewObj = $this->getView();
     if ($viewObj->m_LastRenderedForm && $viewObj->m_LastRenderedForm != 'help.form.HelpWidgetListForm' && $viewObj->m_LastRenderedForm != 'notification.widget.NotificationWidgetForm') {
         $this->lastViewMode = $viewObj->m_LastRenderedForm;
     }
     $recArr = $this->readInputRecord();
     $this->viewMode = $recArr['viewmode'];
     $targetForm = $recArr['viewmode'];
     $formObj = BizSystem::GetObject($targetForm);
     $formHTML = $formObj->render();
     BizSystem::clientProxy()->redrawForm($this->lastViewMode, $formHTML);
     $this->lastViewMode = $this->viewMode;
 }
开发者ID:Why-Not-Sky,项目名称:cubi-ng,代码行数:18,代码来源:FormSelectorWidget.php

示例5: getFormReferences

 protected function getFormReferences()
 {
     // get user widgets of this view
     $user_id = BizSystem::GetUserProfile("Id");
     $viewName = $this->m_Name;
     $searchRule = "[user_id]='{$user_id}' AND [view]='{$viewName}'";
     $do = BizSystem::GetObject($this->m_UserWidgetDO);
     $formRecs = $do->directfetch($searchRule);
     // if no user widgets found, get system widgets of this view
     if (count($formRecs) == 0) {
         $searchRule = "[user_id]=0 AND [view]='{$viewName}'";
         $formRecs = $do->directfetch($searchRule);
     }
     $formRefXML = array();
     foreach ($formRecs as $form) {
         $formRefXML[] = array("ATTRIBUTES" => array("NAME" => $form['widget']), "VALUE" => null);
         $this->columns[$form['column']][] = $form['widget'];
     }
     return $formRefXML;
 }
开发者ID:Why-Not-Sky,项目名称:cubi-ng,代码行数:20,代码来源:DashboardView.php

示例6: addAcl

 public function addAcl()
 {
     $inputs = $this->readInputs();
     $acl_user = $inputs['fld_acl_uid'];
     $acl_perm = $inputs['fld_acl_perm'];
     //get UserID
     $userRec = BizSystem::getObject("system.do.UserDO", 1)->fetchOne("[username]='{$acl_user}'");
     $acl_user_id = $userRec['Id'];
     $parent_record_id = $this->m_ParentRecordId;
     //get parent do table
     $prtForm = $this->m_ParentFormName;
     $prtFormObj = BizSystem::GetObject($prtForm);
     $dataObj = $prtFormObj->getDataObj();
     $parent_record_table = $dataObj->m_MainTable;
     $aclDO = BizSystem::getObject("common.do.DataACLDO");
     $sql = "\n\t\t\t[record_table]='{$parent_record_table}' AND \n\t\t\t[record_id]='{$parent_record_id}' AND\n\t\t\t[user_id]='{$acl_user_id}' \n\t\t";
     $rec = $aclDO->fetchOne($sql);
     if (!$rec) {
         $aclRecord = array("record_table" => $parent_record_table, "record_id" => $parent_record_id, "user_id" => $acl_user_id, "user_perm" => $acl_perm);
         $aclDO->insertRecord($aclRecord);
     }
     $this->rerender();
 }
开发者ID:Why-Not-Sky,项目名称:cubi-ng,代码行数:23,代码来源:DataACLForm.php

示例7: installChangeLog

 protected function installChangeLog($xml)
 {
     $this->log("Install Module Change Logs.");
     $module_name = $xml['Name'];
     if (!isset($xml->ChangeLog->Version)) {
         return true;
     }
     foreach ($xml->ChangeLog->Version as $version) {
         $version_name = (string) $version['Name'];
         if (isset($version->Change)) {
             $changelogDO = BizSystem::GetObject("system.do.ModuleChangeLogDO");
             foreach ($version->Change as $change) {
                 $changelogRec = array();
                 $changelogRec['module'] = (string) $module_name;
                 $changelogRec['name'] = (string) $change['Name'];
                 $changelogRec['description'] = (string) $change['Description'];
                 $changelogRec['status'] = (string) $change['Status'];
                 $changelogRec['version'] = (string) $version_name;
                 $changelogRec['type'] = (string) $change['Type'];
                 $changelogRec['publish_date'] = (string) $change['PublishDate'];
                 try {
                     if (strtolower($changelogRec['status']) != '') {
                         $oldRec = $changelogDO->fetchOne("[name]='" . $changelogRec['name'] . "'");
                         if ($oldRec) {
                             $changelogRec['Id'] = $oldRec['Id'];
                             $changelogDO->updateRecord($changelogRec, $oldRec);
                         } else {
                             $changelogDO->insertRecord($changelogRec);
                         }
                     }
                 } catch (Exception $e) {
                     //var_dump($e->getMessage());
                 }
             }
         }
     }
 }
开发者ID:Why-Not-Sky,项目名称:cubi-ng,代码行数:37,代码来源:ModuleLoader.php

示例8:

#!/usr/bin/env php
<?php 
/*
 * Cubi package discovery
 */
include_once "../app_init.php";
if (!defined("CLI")) {
    exit;
}
$packageService = "package.lib.PackageService";
// get package service
$pkgsvc = BizSystem::GetObject($packageService);
$categories = $pkgsvc->discoverCategories();
print_r($categories);
$packages = $pkgsvc->discoverPackages();
print_r($packages);
//$pkgsvc->downloadPackage('grm');
开发者ID:Why-Not-Sky,项目名称:cubi-ng,代码行数:17,代码来源:pkg_discover.php

示例9: hasOwnerField

 public function hasOwnerField()
 {
     $prtForm = $this->m_ParentFormName;
     $prtFormObj = BizSystem::GetObject($prtForm);
     $field = $prtFormObj->getDataObj()->getField('owner_id');
     if ($field) {
         return true;
     } else {
         return false;
     }
 }
开发者ID:Why-Not-Sky,项目名称:cubi-ng,代码行数:11,代码来源:DataSharingForm.php

示例10:

#!/usr/bin/env php
<?php 
/*
 * Cubi license acquisition
 */
include_once "../app_init.php";
if (!defined("CLI")) {
    exit;
}
$licenseClient = "service.licenseClient";
// get package service
//echo "get license client service";
$licsvc = BizSystem::GetObject($licenseClient);
$activationCode = "hacq2b";
$contactEmail = "rocky@gmail.com";
$serverData = "";
//base64_encode(ioncube_server_data());
$license = $licsvc->acquireLicense($activationCode, $contactEmail, $serverData);
print_r($license);
开发者ID:Why-Not-Sky,项目名称:cubi-ng,代码行数:19,代码来源:get_license.php

示例11: getConfig

 public function getConfig($widget = null)
 {
     if (!$widget) {
         if ($this->widgetForm) {
             $widget = $this->widgetForm;
         } else {
             $widget = $this->m_Name;
         }
     }
     $user_id = BizSystem::GetUserProfile("Id");
     $searchRule = "[widget]='{$widget}' AND [user_id]='{$user_id}'";
     $do = BizSystem::GetObject($this->m_UserWidgetDO);
     $configRec = $do->fetchOne($searchRule);
     $config = $configRec['config'];
     $configArr = unserialize($config);
     return $configArr;
 }
开发者ID:Why-Not-Sky,项目名称:cubi-ng,代码行数:17,代码来源:WidgetForm.php

示例12: getValue

 public function getValue()
 {
     if ($this->allowAccess()) {
         $formElementObj = BizSystem::GetObject($this->m_FormReference);
         if (method_exists($formElementObj, "getValue")) {
             return $formElementObj->getValue();
         }
     }
 }
开发者ID:Why-Not-Sky,项目名称:cubi-ng,代码行数:9,代码来源:FormElement.php

示例13: uninstallChangeLog

 protected function uninstallChangeLog($xml)
 {
     $this->log("Install Module Change Logs.");
     $module_name = $xml['Name'];
     $changelogDO = BizSystem::GetObject("system.do.ModuleChangeLogDO");
     $changelogDO->deleteRecords("[module]='{$module_name}'");
 }
开发者ID:Why-Not-Sky,项目名称:cubi-ng,代码行数:7,代码来源:ModuleUnloader.php

示例14: ShareRecord

 public function ShareRecord()
 {
     $prtForm = $this->m_ParentFormName;
     $prtFormObj = BizSystem::GetObject($prtForm);
     $recId = $this->m_RecordId;
     $dataObj = $prtFormObj->getDataObj();
     $dataRec = $dataObj->fetchById($recId);
     $recArr = $this->readInputRecord();
     $DataRec = $dataRec;
     //notice users has new published data
     //test if changed a new owner
     if ($recArr['notify_user'] && $recArr['group_perm']) {
         $data = $this->fetchData();
         $data['app_index'] = APP_INDEX;
         $data['app_url'] = APP_URL;
         $data['operator_name'] = BizSystem::GetProfileName(BizSystem::getUserProfile("Id"));
         $emailSvc = BizSystem::getService(USER_EMAIL_SERVICE);
         //test if changes for group level visiable
         if ($recArr['group_perm'] >= 1) {
             $group_id = $recArr['group_id'];
             $userList = $this->_getGroupUserList($group_id);
             foreach ($userList as $user_id) {
                 $emailSvc->DataPublishEmail($user_id, $data);
             }
         }
         //test if changes for other group level visiable
         if ($recArr['other_perm'] >= 1) {
             $groupList = $this->_getGroupList();
             foreach ($groupList as $group_id) {
                 $userList = $this->_getGroupUserList($group_id);
                 foreach ($userList as $user_id) {
                     $emailSvc->DataPublishEmail($user_id, $data);
                 }
             }
         }
     }
     if (isset($recArr['group_perm'])) {
         $DataRec['group_perm'] = $recArr['group_perm'];
     }
     if (isset($recArr['other_perm'])) {
         $DataRec['other_perm'] = $recArr['other_perm'];
     }
     if (isset($recArr['group_id'])) {
         $DataRec['group_id'] = $recArr['group_id'];
     }
     if (isset($recArr['owner_id'])) {
         $DataRec['owner_id'] = $recArr['owner_id'];
     }
     if ($DataRec['group_perm'] == '0') {
         $DataRec['other_perm'] = '0';
     }
     $DataRec->save();
     //$prtFormObj->getDataObj()->updateRecord($newDataRec,$dataRec);
     if ($recArr['update_ref_data']) {
         if ($dataObj->m_ObjReferences->count()) {
             $this->_casacadeUpdate($dataObj, $recArr);
         }
     }
     if ($this->m_ParentFormName) {
         $this->close();
         $this->renderParent();
     }
     $this->processPostAction();
 }
开发者ID:Why-Not-Sky,项目名称:cubi-ng,代码行数:64,代码来源:DataPublishingForm.php


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