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


PHP CreateObject函数代码示例

本文整理汇总了PHP中CreateObject函数的典型用法代码示例。如果您正苦于以下问题:PHP CreateObject函数的具体用法?PHP CreateObject怎么用?PHP CreateObject使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: __construct

 public function __construct()
 {
     parent::__construct();
     self::process_booking_unauthorized_exceptions();
     $this->bo = CreateObject('booking.boasync_settings');
     self::set_active_menu('booking::settings::async_settings');
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:7,代码来源:class.uiasync_settings.inc.php

示例2: get_db

 public function get_db()
 {
     if ($this->db && is_object($this->db)) {
         return $this->db;
     }
     $config = CreateObject('phpgwapi.config', 'rental');
     $config->read();
     if (!$config->config_data['external_db_host'] || !$this->ping($config->config_data['external_db_host'])) {
         $message = "Database server {$config->config_data['external_db_host']} is not accessible";
         phpgwapi_cache::message_set($message, 'error');
         return false;
     }
     $db = createObject('phpgwapi.db', null, null, true);
     $db->debug = !!$config->config_data['external_db_debug'];
     $db->Host = $config->config_data['external_db_host'];
     $db->Port = $config->config_data['external_db_port'];
     $db->Type = $config->config_data['external_db_type'];
     $db->Database = $config->config_data['external_db_name'];
     $db->User = $config->config_data['external_db_user'];
     $db->Password = $config->config_data['external_db_password'];
     try {
         $db->connect();
         $this->connected = true;
     } catch (Exception $e) {
         $status = lang('unable_to_connect_to_database');
     }
     $this->db = $db;
     return $db;
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:29,代码来源:class.bofellesdata.inc.php

示例3: get_instance

 /**
  * Get a static reference to the storage object associated with this model object
  *
  * @return controller_socontrol_group the storage object
  */
 public static function get_instance()
 {
     if (self::$so == null) {
         self::$so = CreateObject('controller.socontrol_group_list');
     }
     return self::$so;
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:12,代码来源:class.socontrol_group_list.inc.php

示例4: __construct

 public function __construct()
 {
     parent::__construct();
     $this->bo = CreateObject('booking.bodocument_view');
     $this->url_prefix = 'booking.uidocument_view';
     $this->module = 'booking';
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:7,代码来源:class.uidocument_view.inc.php

示例5: ShowPage

 function ShowPage($sPage)
 {
     global $g_oSec, $dcl_info;
     commonHeader();
     if (($productid = DCL_Sanitize::ToInt($_REQUEST['id'])) === null) {
         trigger_error('Data sanitize failed.');
         return;
     }
     if (!$g_oSec->HasPerm(DCL_ENTITY_PRODUCT, DCL_PERM_VIEW, $productid)) {
         return PrintPermissionDenied();
     }
     $this->oProduct =& CreateObject('dcl.dbProducts');
     if ($this->oProduct->Load($productid) == -1) {
         trigger_error('Could not find a product with an id of ' . $productid, E_USER_ERROR);
         return;
     }
     $this->oSmarty->assign('VAL_ID', $this->oProduct->id);
     $this->oSmarty->assign('VAL_NAME', $this->oProduct->name);
     $this->oSmarty->assign('PERM_VIEWWO', $g_oSec->HasPerm(DCL_ENTITY_WORKORDER, DCL_PERM_VIEW));
     $this->oSmarty->assign('PERM_VIEWTCK', $g_oSec->HasPerm(DCL_ENTITY_TICKET, DCL_PERM_VIEW));
     $this->oSmarty->assign('PERM_WIKI', $dcl_info['DCL_WIKI_ENABLED'] == 'Y' && $g_oSec->HasPerm(DCL_ENTITY_PRODUCT, DCL_PERM_VIEWWIKI));
     $this->oSmarty->assign('PERM_EDIT', $g_oSec->HasPerm(DCL_ENTITY_PRODUCT, DCL_PERM_MODIFY));
     $this->oSmarty->assign('PERM_DELETE', $g_oSec->HasPerm(DCL_ENTITY_PRODUCT, DCL_PERM_DELETE));
     $this->oSmarty->assign('PERM_VERSIONS', $dcl_info['DCL_BUILD_MANAGER_ENABLED'] == 'Y' && $this->oProduct->is_versioned == 'Y');
     SmartyDisplay($this->oSmarty, $sPage);
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:26,代码来源:class.htmlProductDashboard.inc.php

示例6: boimagemagick

 function boimagemagick()
 {
     //FIXME check version and leave without doing nothing when lower then 5.4.9
     $this->common = CreateObject('jinn.bocommon');
     $this->current_config = $this->common->get_config();
     $this->imagemagickdir = $this->current_config['imagemagickdir'];
 }
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:7,代码来源:class.boimagemagick.inc.php

示例7: uimanagefields

 function uimanagefields()
 {
     $GLOBALS['phpgw']->nextmatches = CreateObject('phpgwapi.nextmatchs');
     $this->bo = CreateObject('registration.bomanagefields');
     $this->bo->check_admin();
     $this->base_url = $this->bo->base_url;
 }
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:7,代码来源:class.uimanagefields.inc.php

示例8: __construct

 function __construct($session = False)
 {
     $this->so = CreateObject('admin.soserver');
     if ($session) {
         $this->read_sessiondata();
         $this->use_session = True;
     }
     $start = $GLOBALS['start'];
     $query = $GLOBALS['query'];
     $sort = $GLOBALS['sort'];
     $order = $GLOBALS['order'];
     if (!empty($start) || $start == '0' || $start == 0) {
         if ($this->debug) {
             echo '<br>overriding start: "' . $this->start . '" now "' . $start . '"';
         }
         $this->start = $start;
     }
     if (empty($query) && !empty($this->query) || !empty($query)) {
         $this->query = $query;
     }
     if ($limit) {
         $this->limit = $limit;
     }
     if (isset($sort)) {
         $this->sort = $sort;
     }
     if (isset($order)) {
         $this->order = $order;
     }
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:30,代码来源:class.boserver.inc.php

示例9: ListVersions

 function ListVersions()
 {
     // FIXME: application/x-javascript for Opera
     header('Content-Type: application/json');
     $product_id = @DCL_Sanitize::ToInt($_REQUEST['product_id']);
     if ($product_id === null) {
         exit;
     }
     $oDB = CreateObject('dcl.dbProductVersion');
     $aOptions = $oDB->GetOptions('product_version_id', 'product_version_text', 'active', isset($_REQUEST['active']) && $_REQUEST['active'] == 'Y', '', "product_id={$product_id}");
     $bFirst = true;
     echo '{';
     echo '"totalRecords":', count($aOptions), ',';
     echo '"data":[';
     for ($i = 0; $i < count($aOptions); $i++) {
         if ($i > 0) {
             echo ',';
         }
         echo '{';
         echo '"id":', $aOptions[$i]['product_version_id'], ',';
         echo '"text":"', str_replace('"', '\\"', str_replace("\\", "\\\\", $aOptions[$i]['product_version_text'])), '"';
         echo '}';
     }
     echo ']}';
     exit;
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:26,代码来源:class.jsonProductVersion.inc.php

示例10: __construct

 function __construct($session = false)
 {
     $GLOBALS['phpgw_info']['flags']['currentapp'] = 'property';
     $this->config = CreateObject('admin.soconfig', $GLOBALS['phpgw']->locations->get_id('property', '.invoice'));
     if ($session) {
         $this->read_sessiondata();
         $this->use_session = true;
     }
     $start = phpgw::get_var('start', 'int', 'REQUEST', 0);
     $query = phpgw::get_var('query');
     $sort = phpgw::get_var('sort');
     $order = phpgw::get_var('order');
     $filter = phpgw::get_var('filter', 'int');
     $cat_id = phpgw::get_var('cat_id', 'int');
     if ($start || $start == 0) {
         $this->start = $start;
     }
     if ($query) {
         $this->query = $query;
     }
     if ($sort) {
         $this->sort = $sort;
     }
     if ($order) {
         $this->order = $order;
     }
     if ($filter) {
         $this->filter = $filter;
     }
     $this->cat_id = $cat_id;
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:31,代码来源:class.boXport.inc.php

示例11: boadmin

 function boadmin()
 {
     $this->common = CreateObject('jinn.bocommon');
     $this->so = CreateObject('jinn.sojinn');
     $this->current_config = $this->common->get_config();
     $this->read_sessiondata();
     $this->use_session = True;
     $_form = $GLOBALS['HTTP_POST_VARS']['form'] ? $GLOBALS['HTTP_POST_VARS']['form'] : $GLOBALS['HTTP_GET_VARS']['form'];
     $_action = $GLOBALS['HTTP_POST_VARS']['action'] ? $GLOBALS['HTTP_POST_VARS']['action'] : $GLOBALS['HTTP_GET_VARS']['action'];
     $_site_id = $GLOBALS['HTTP_POST_VARS']['site_id'] ? $GLOBALS['HTTP_POST_VARS']['site_id'] : $GLOBALS['HTTP_GET_VARS']['site_id'];
     $_site_object_id = $GLOBALS['HTTP_POST_VARS']['site_object_id'] ? $GLOBALS['HTTP_POST_VARS']['site_object_id'] : $GLOBALS['HTTP_GET_VARS']['site_object_id'];
     $_where_key = $GLOBALS['HTTP_POST_VARS']['where_key'] ? $GLOBALS['HTTP_POST_VARS']['where_key'] : $GLOBALS['HTTP_GET_VARS']['where_key'];
     $_where_value = $GLOBALS['HTTP_POST_VARS']['where_value'] ? $GLOBALS['HTTP_POST_VARS']['where_value'] : $GLOBALS['HTTP_GET_VARS']['where_value'];
     if (!empty($_where_key)) {
         $this->where_key = $_where_key;
     }
     if (!empty($_where_value)) {
         $this->where_value = $_where_value;
     }
     if (!empty($_action) && empty($this->action) || !empty($_action)) {
         $this->action = $_action;
     }
     if ($_form == 'main_menu' || !empty($site_id)) {
         $this->site_id = $_site_id;
     }
     if ($_form == 'main_menu' || !empty($site_object_id)) {
         $this->site_object_id = $_site_object_id;
     }
     // get array of site and object
     $this->site = $this->so->get_site_values($this->site_id);
     if ($this->site_object_id) {
         $this->site_object = $this->so->get_object_values($this->site_object_id);
     }
     $this->include_plugins();
 }
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:35,代码来源:class.boadmin.inc.php

示例12: __construct

 public function __construct($coverageid = "")
 {
     if ($coverageid == "" or $coverageid == 0) {
         return false;
     }
     // Check in the cache
     if (!isset($GLOBALS['__freemed']['cache']['coverage'][$coverageid])) {
         // Get record
         $this->local_record = $GLOBALS['sql']->get_link('coverage', $coverageid);
         // Cache it
         $GLOBALS['__freemed']['cache']['coverage'][$coverageid] = $this->local_record;
     } else {
         // Retrieve from cache
         $this->local_record = $GLOBALS['__freemed']['cache']['coverage'][$coverageid];
     }
     $this->covpatgrpno = $this->local_record['covpatgrpno'];
     $this->covpatinsno = $this->local_record['covpatinsno'];
     $this->covstatus = $this->local_record['covstatus'];
     $this->covtype = $this->local_record['covtype'];
     $this->coveffdt = $this->local_record['coveffdt'];
     $this->covinsco = CreateObject('org.freemedsoftware.core.InsuranceCompany', $this->local_record['covinsco']);
     $this->covreldep = $this->local_record['covrel'];
     $this->id = $this->local_record['id'];
     $this->covpatient = $this->local_record['covpatient'];
     if ($this->covreldep != "S") {
         // you pass this to the guarantor class
         $this->covdep = $this->id;
     } else {
         $this->covdep = 0;
     }
 }
开发者ID:rrsc,项目名称:freemed,代码行数:31,代码来源:Coverage.class.php

示例13: addfiles

 public function addfiles()
 {
     $GLOBALS['phpgw_info']['flags']['xslt_app'] = false;
     $GLOBALS['phpgw_info']['flags']['noframework'] = true;
     $GLOBALS['phpgw_info']['flags']['nofooter'] = true;
     $acl =& $GLOBALS['phpgw']->acl;
     $acl_add = $acl->check($this->acl_location, PHPGW_ACL_ADD, 'manual');
     $acl_edit = $acl->check($this->acl_location, PHPGW_ACL_EDIT, 'manual');
     $cat_id = phpgw::get_var('id', 'int');
     $check = phpgw::get_var('check', 'bool');
     $fileuploader = CreateObject('property.fileuploader');
     if (!$acl_add && !$acl_edit) {
         $GLOBALS['phpgw']->common->phpgw_exit();
     }
     if (!$cat_id) {
         $GLOBALS['phpgw']->common->phpgw_exit();
     }
     $test = false;
     if ($test) {
         if (!empty($_FILES)) {
             $tempFile = $_FILES['Filedata']['tmp_name'];
             $targetPath = "{$GLOBALS['phpgw_info']['server']['temp_dir']}/";
             $targetFile = str_replace('//', '/', $targetPath) . $_FILES['Filedata']['name'];
             move_uploaded_file($tempFile, $targetFile);
             echo str_replace($GLOBALS['phpgw_info']['server']['temp_dir'], '', $targetFile);
         }
         $GLOBALS['phpgw']->common->phpgw_exit();
     }
     if ($check) {
         $fileuploader->check($cat_id, '/manual');
     } else {
         $fileuploader->upload($cat_id, '/manual');
     }
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:34,代码来源:class.bodocuments.inc.php

示例14: restoreSessionData

 function restoreSessionData()
 {
     $arrayFunctions =& CreateObject('phpgwapi.arrayfunctions');
     $this->sessionData = $GLOBALS['phpgw']->session->appsession('filter_session_data');
     // sort the filter list
     $unsortedFilter = $this->sofilter->restoreFilter();
     // save the quicksearchfilter
     // must always have id=0
     if (is_array($unsortedFilter[0])) {
         $quickSearchFilter[0] = $unsortedFilter[0];
         unset($unsortedFilter[0]);
     } else {
         $quickSearchFilter[0] = array('filterName' => lang('quicksearch'));
     }
     // _debug_array($this->sessionData['filter']);
     // the first one is always the quicksearch filter
     if (count($unsortedFilter) > 0) {
         $sortedFilter = $arrayFunctions->arfsort($unsortedFilter, array('filterName'));
         $sortedFilter = array_merge($quickSearchFilter, $sortedFilter);
     } else {
         $sortedFilter = $quickSearchFilter;
     }
     #_debug_array($sortedFilter);
     $this->sessionData['filter'] = $sortedFilter;
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:25,代码来源:class.bofilter.inc.php

示例15: boNoteType

 function boNoteType()
 {
     parent::boAdminObject();
     $this->oDB =& CreateObject('dcl.dbNoteType');
     $this->sKeyField = 'note_type_id';
     $this->Entity = DCL_ENTITY_NOTETYPE;
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:7,代码来源:class.boNoteType.inc.php


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