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


PHP owa_coreAPI::setupStorageEngine方法代码示例

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


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

示例1: __construct

 /**
  * Constructor
  * 
  * @param string id the id of the configuration array to load
  */
 function __construct()
 {
     // create configuration object
     $this->config = owa_coreAPI::entityFactory('base.configuration');
     // load the default settings
     $this->getDefaultConfig();
     // include/load config file
     $this->loadConfigFile();
     // apply config constants
     $this->applyConfigConstants();
     // setup directory paths
     $this->setupPaths();
     // set default timezone while surpressing any warning
     if (function_exists('date_default_timezone_set')) {
         $level = error_reporting(0);
         date_default_timezone_set($this->get('base', 'timezone'));
         error_reporting($level);
     }
     // Todo: must remove config object dependancy from all classes generated by $this->load
     // before we can uncomment this and remove it from owa_caller constructor or else there
     // is a race condition.
     //if ($this->isConfigFilePresent()) {
     //	$this->load($this->get('base', 'configuration_id'));
     //}
     // include storage engine class so that DTD constants get loaded
     owa_coreAPI::setupStorageEngine($this->get('base', 'db_type'));
 }
开发者ID:nishantmendiratta,项目名称:Open-Web-Analytics,代码行数:32,代码来源:settings.php

示例2: _getDatabaseConnection

 /**
  * Creates a database connection for retrieving the requested data.
  **/
 function _getDatabaseConnection()
 {
     $db_type = owa_coreAPI::getSetting('base', 'db_type');
     $ret = owa_coreAPI::setupStorageEngine($db_type);
     if ($this->connection == null) {
         $connection_class = 'owa_db_' . $db_type;
         $this->connection = new $connection_class($this->settings->getDatabaseHost(), $this->settings->getDatabaseName(), $this->settings->getDatabaseUser(), $this->settings->getDatabasePassword());
     }
     return $this->connection;
 }
开发者ID:nishantmendiratta,项目名称:Open-Web-Analytics,代码行数:13,代码来源:adserver.php

示例3: __construct

 /**
  * Constructor
  * 
  * @param string id the id of the configuration array to load
  */
 function __construct()
 {
     // create configuration object
     $this->config = owa_coreAPI::entityFactory('base.configuration');
     // load the default settings
     $this->config->set('settings', $this->getDefaultSettingsArray());
     // include/load config file
     $this->loadConfigFile();
     // apply config constants
     $this->applyConfigConstants();
     // setup directory paths
     $this->setupPaths();
     // Todo: must remove config object dependancy from all classes generated by $this->load
     // before we can uncomment this and remove it from owa_caller constructor or else there
     // is a race condition.
     //if ($this->isConfigFilePresent()) {
     //	$this->load($this->get('base', 'configuration_id'));
     //}
     // include storage engine class so that DTD constants get loaded
     owa_coreAPI::setupStorageEngine($this->get('base', 'db_type'));
 }
开发者ID:rgaviras,项目名称:Open-Web-Analytics,代码行数:26,代码来源:settings.php

示例4: entityFactory

 /**
  * Convienence method for generating entities
  *
  * @param unknown_type $entity_name
  * @return unknown
  */
 public static function entityFactory($entity_name)
 {
     /* SETUP STORAGE ENGINE */
     // Must be called before any entities are created
     if (!defined('OWA_DTD_INT')) {
         if (defined('OWA_DB_TYPE')) {
             owa_coreAPI::setupStorageEngine(OWA_DB_TYPE);
         } else {
             owa_coreAPI::setupStorageEngine('mysql');
         }
     }
     if (!class_exists('owa_entity')) {
         require_once OWA_BASE_CLASSES_DIR . 'owa_entity.php';
     }
     $entity = owa_coreAPI::moduleSpecificFactory($entity_name, 'entities', '', '', false);
     $entity->name = $entity_name;
     return $entity;
     //return owa_coreAPI::supportClassFactory('base', 'entityManager', $entity_name);
 }
开发者ID:ashutoshdev,项目名称:Open-Web-Analytics,代码行数:25,代码来源:owa_coreAPI.php


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