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


PHP CRM_Core_DAO::init方法代码示例

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


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

示例1: civicrm_init

function civicrm_init()
{
    $config =& CRM_Core_Config::singleton();
    CRM_Core_DAO::init($config->dsn, $config->daoDebug);
    $factoryClass = 'CRM_Contact_DAO_Factory';
    CRM_Core_DAO::setFactory(new $factoryClass());
    // set error handling
    PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, array('CRM_Core_Error', 'handle'));
}
开发者ID:bhirsch,项目名称:voipdrupal-4.7-1.0,代码行数:9,代码来源:admin.civicrm.php

示例2: _initDAO

 /**
  * initialize the DataObject framework
  *
  * @return void
  * @access private
  */
 private function _initDAO()
 {
     CRM_Core_DAO::init($this->dsn);
     $factoryClass = $this->DAOFactoryClass;
     require_once str_replace('_', DIRECTORY_SEPARATOR, $factoryClass) . '.php';
     CRM_Core_DAO::setFactory(new $factoryClass());
 }
开发者ID:ksecor,项目名称:civicrm,代码行数:13,代码来源:Config.php

示例3: boot

 /**
  * Get a list of boot services.
  *
  * These are services which must be setup *before* the container can operate.
  *
  * @param bool $loadFromDB
  * @throws \CRM_Core_Exception
  */
 public static function boot($loadFromDB)
 {
     $bootServices = array();
     \Civi::$statics[__CLASS__]['boot'] =& $bootServices;
     $bootServices['runtime'] = array('class' => 'CRM_Core_Config_Runtime', 'obj' => $runtime = new \CRM_Core_Config_Runtime());
     $runtime->initialize($loadFromDB);
     if ($loadFromDB && $runtime->dsn) {
         \CRM_Core_DAO::init($runtime->dsn);
     }
     $bootServices['paths'] = array('class' => 'Civi\\Core\\Paths', 'obj' => new \Civi\Core\Paths());
     $class = $runtime->userFrameworkClass;
     $bootServices['userSystem'] = array('class' => 'CRM_Utils_Cache_Interface', 'obj' => $userSystem = new $class());
     $userSystem->initialize();
     $userPermissionClass = 'CRM_Core_Permission_' . $runtime->userFramework;
     $bootServices['userPermissionClass'] = array('class' => 'CRM_Core_Permission_Base', 'obj' => new $userPermissionClass());
     $bootServices['cache.settings'] = array('class' => 'CRM_Utils_Cache_Interface', 'obj' => \CRM_Utils_Cache::create(array('name' => 'settings', 'type' => array('*memory*', 'SqlGroup', 'ArrayCache'))));
     $bootServices['settings_manager'] = array('class' => 'Civi\\Core\\SettingsManager', 'obj' => new \Civi\Core\SettingsManager($bootServices['cache.settings']['obj']));
     $bootServices['lockManager'] = array('class' => 'Civi\\Core\\Lock\\LockManager', 'obj' => self::createLockManager());
     if ($loadFromDB && $runtime->dsn) {
         \CRM_Utils_Hook::singleton(TRUE);
         \CRM_Extension_System::singleton(TRUE);
         $c = new self();
         \Civi::$statics[__CLASS__]['container'] = $c->loadContainer();
     }
 }
开发者ID:rameshrr99,项目名称:civicrm-core,代码行数:33,代码来源:Container.php

示例4: _initDAO

 /**
  * Initialize the DataObject framework.
  *
  * @return void
  */
 private function _initDAO()
 {
     CRM_Core_DAO::init($this->dsn);
     $factoryClass = $this->DAOFactoryClass;
     require_once str_replace('_', DIRECTORY_SEPARATOR, $factoryClass) . '.php';
     CRM_Core_DAO::setFactory(new $factoryClass());
     if (CRM_Utils_Constant::value('CIVICRM_MYSQL_STRICT', CRM_Utils_System::isDevelopment())) {
         CRM_Core_DAO::executeQuery('SET SESSION sql_mode = STRICT_TRANS_TABLES');
     }
 }
开发者ID:BorislavZlatanov,项目名称:civicrm-core,代码行数:15,代码来源:Config.php

示例5: init

 /**
  *
  */
 function init()
 {
     \CRM_Core_DAO::init($this->cfg->dsn);
 }
开发者ID:twomice,项目名称:civix,代码行数:7,代码来源:class.api.php

示例6: boot

 /**
  * Get a list of boot services.
  *
  * These are services which must be setup *before* the container can operate.
  *
  * @param bool $loadFromDB
  * @throws \CRM_Core_Exception
  */
 public static function boot($loadFromDB)
 {
     // Array(string $serviceId => object $serviceInstance).
     $bootServices = array();
     \Civi::$statics[__CLASS__]['boot'] =& $bootServices;
     $bootServices['runtime'] = $runtime = new \CRM_Core_Config_Runtime();
     $runtime->initialize($loadFromDB);
     $bootServices['paths'] = new \Civi\Core\Paths();
     $class = $runtime->userFrameworkClass;
     $bootServices['userSystem'] = $userSystem = new $class();
     $userSystem->initialize();
     $userPermissionClass = 'CRM_Core_Permission_' . $runtime->userFramework;
     $bootServices['userPermissionClass'] = new $userPermissionClass();
     $bootServices['cache.settings'] = \CRM_Utils_Cache::create(array('name' => 'settings', 'type' => array('*memory*', 'SqlGroup', 'ArrayCache')));
     $bootServices['settings_manager'] = new \Civi\Core\SettingsManager($bootServices['cache.settings']);
     $bootServices['lockManager'] = self::createLockManager();
     if ($loadFromDB && $runtime->dsn) {
         \CRM_Core_DAO::init($runtime->dsn);
         \CRM_Utils_Hook::singleton(TRUE);
         \CRM_Extension_System::singleton(TRUE);
         \CRM_Extension_System::singleton(TRUE)->getClassLoader()->register();
         $runtime->includeCustomPath();
         $c = new self();
         $container = $c->loadContainer();
         foreach ($bootServices as $name => $obj) {
             $container->set($name, $obj);
         }
         \Civi::$statics[__CLASS__]['container'] = $container;
     }
 }
开发者ID:kcristiano,项目名称:civicrm-core,代码行数:38,代码来源:Container.php

示例7: initDAO

 /**
  * initialize the DataObject framework
  *
  * @return void
  * @access private
  */
 function initDAO()
 {
     CRM_Core_DAO::init($this->dsn, $this->daoDebug);
     $factoryClass = $this->DAOFactoryClass;
     CRM_Core_DAO::setFactory(new $factoryClass());
 }
开发者ID:bhirsch,项目名称:voipdrupal-4.7-1.0,代码行数:12,代码来源:Config.php


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