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


PHP Zend_Db_Table::__construct方法代码示例

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


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

示例1: __construct

 public function __construct($config = array())
 {
     $this->db = Zend_Registry::get('db_bacula');
     $this->db_adapter = Zend_Registry::get('DB_ADAPTER');
     $this->bacula_acl = new MyClass_BaculaAcl();
     parent::__construct($config);
 }
开发者ID:staser,项目名称:webacula,代码行数:7,代码来源:Client.php

示例2: __construct

 public function __construct($config = array())
 {
     $this->db = Zend_Registry::get('db_bacula');
     $this->db_adapter = Zend_Registry::get('DB_ADAPTER');
     $this->_hasher = new MyClass_PasswordHash();
     parent::__construct($config);
 }
开发者ID:staser,项目名称:webacula,代码行数:7,代码来源:Wbusers.php

示例3: __construct

 public function __construct($config = array(), $definition = null)
 {
     parent::__construct($config, $definition);
     $currentRoute = Modules_Router_Model_Router::getInstance()->current();
     $this->_currentRouteId = $currentRoute['route_id'];
     $this->_fetchBlocks();
 }
开发者ID:kytvi2p,项目名称:ZettaFramework,代码行数:7,代码来源:Blocks.php

示例4: __construct

    /**
     * Construtor padrão
     */
    public function __construct($config = array(), $definition = null)
    {
        parent::__construct($config, $definition);
        $this->_init();

        $this->_translator = new Nidorx_Translator();
    }
开发者ID:nidorx,项目名称:Zend_Dao_Vo,代码行数:10,代码来源:Dao.php

示例5: __construct

 public function __construct($id = 0)
 {
     parent::__construct();
     if (is_numeric($id) && $id > 0) {
         $rowset = $this->find($id);
         $this->row = $rowset[0];
     }
 }
开发者ID:Cryde,项目名称:sydney-core,代码行数:8,代码来源:Table.php

示例6: __construct

 public function __construct($config = array())
 {
     $this->db = Zend_Registry::get('db_bacula');
     $this->db_adapter = Zend_Registry::get('DB_ADAPTER');
     $config['db'] = $this->db;
     $config['sequence'] = true;
     parent::__construct($config);
 }
开发者ID:neverstoplwy,项目名称:contrib-webacula,代码行数:8,代码来源:Wblogbook.php

示例7: __construct

 /**
  * Constructor
  *
  * @param array config
  */
 public function __construct($config = array())
 {
     parent::__construct($config);
     $db = $this->getAdapter();
     $this->_left = $db->quoteIdentifier($this->_left);
     $this->_right = $db->quoteIdentifier($this->_right);
     $this->_level = $db->quoteIdentifier($this->_level);
 }
开发者ID:BGCX262,项目名称:zx-zf-hg-to-git,代码行数:13,代码来源:Nestedset.php

示例8:

 function __construct($config = null)
 {
     $dbAdapter = self::getDefaultAdapter();
     if ($dbAdapter) {
         $dbAdapter->query("SET NAMES 'utf8'");
     }
     return parent::__construct($config);
 }
开发者ID:BGCX261,项目名称:zillatek-project-svn-to-git,代码行数:8,代码来源:DB.php

示例9: __construct

 public function __construct($config = array())
 {
     global $application;
     parent::__construct($config);
     $resources = $application->getOption("resources");
     if (isset($resources['db']['settings']['tableprefix'])) {
         $this->_name = $resources['db']['settings']['tableprefix'] . $this->_name;
     }
 }
开发者ID:Zerone,项目名称:ImJob.org,代码行数:9,代码来源:Roles.php

示例10: __construct

 /**
  * Constructor
  * 
  * @param array $options = array()
  * @return null
  */
 public function __construct(array $options = array())
 {
     // ** Automatically setup the metadata cache ONLY if not set **
     if (!isset($options['metadataCache'])) {
         $options['metadataCache'] = Zend_Registry::get('cache');
     }
     // ** Continue normally **
     parent::__construct($options);
 }
开发者ID:blerby,项目名称:blerby,代码行数:15,代码来源:Table.php

示例11: __construct

 public function __construct($config = array())
 {
     parent::__construct($config);
     if (isset($config[self::USER])) {
         $this->_user = $config[self::USER];
     } elseif (Zend_Registry::isRegistered("shard")) {
         $this->_user = Zend_Registry::get("shard");
     }
 }
开发者ID:kreativmind,项目名称:storytlr,代码行数:9,代码来源:Table.php

示例12: __construct

 public function __construct()
 {
     $dbconfig = new Zend_Config_Ini(CONFIGS_PATH . "/application.ini", 'production');
     Zend_Registry::set('dbprefix', $dbconfig->resources->db->params->prefix);
     $this->_dbprefix = $dbconfig->resources->db->params->prefix;
     $dbprefix = Zend_Registry::get('dbprefix');
     $this->_name = $dbprefix . $this->_name;
     parent::__construct();
 }
开发者ID:xindalu,项目名称:evolve,代码行数:9,代码来源:Db.php

示例13: __construct

 public function __construct($config = array(), $definition = null)
 {
     parent::__construct($config, $definition);
     $config = Zend_Registry::get("__CONFIG__");
     if (isset($config["page"]["limit"])) {
         $this->limit = $config["page"]["limit"];
     } else {
         $this->limit = 20;
     }
 }
开发者ID:tudorfis,项目名称:urfx,代码行数:10,代码来源:Abstract.php

示例14: array

 function Bolts_Db_Table_Abstract($config = null)
 {
     $this->_errors = array();
     if (isset($this->_use_adapter)) {
         $dbAdapters = Zend_Registry::get('dbAdapters');
         $config = $dbAdapters[$this->_use_adapter];
     }
     $this->_Bolts_plugin = Bolts_Plugin::getInstance();
     return parent::__construct($config);
 }
开发者ID:jaybill,项目名称:Bolts,代码行数:10,代码来源:Abstract.php

示例15: __construct

 /**
  * @param string $prefix для формирования имен tmp таблиц
  * @param string $jobidHash хэш-индекс для массива jobid
  */
 public function __construct($jobidhash, $ttl_restore_session)
 {
     $this->db_adapter = Zend_Registry::get('DB_ADAPTER');
     $this->jobidhash = $jobidhash;
     $this->ttl_restore_session = $ttl_restore_session;
     // формируем имена временных таблиц
     $this->tmp_file = self::_PREFIX . 'file_' . $this->jobidhash;
     $config['db'] = Zend_Registry::get('db_bacula');
     // database
     $config['name'] = $this->_name;
     // name table
     $config['primary'] = $this->_primary;
     // primary key
     $config['sequence'] = true;
     parent::__construct($config);
     // setup DB adapter
     $this->_db = Zend_Db_Table::getAdapter('db_bacula');
     // существует ли таблица ?
     try {
         $this->_db->query('SELECT tmpId FROM ' . $this->_name . ' LIMIT 1');
     } catch (Zend_Exception $e) {
         // создаем таблицу
         switch ($this->db_adapter) {
             case 'PDO_MYSQL':
                 $sql = 'CREATE TABLE ' . $this->_name . ' (
                     tmpId    INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
                     tmpName  CHAR(64) UNIQUE NOT NULL,
                     tmpJobIdHash CHAR(64) NOT NULL,
                     tmpCreate   TIMESTAMP NOT NULL,
                     tmpIsCloneOk INTEGER DEFAULT 0,
                     PRIMARY KEY(tmpId)
                     )';
                 break;
             case 'PDO_PGSQL':
                 $sql = 'CREATE TABLE ' . $this->_name . ' (
                     tmpId    SERIAL NOT NULL,
                     tmpName  CHAR(64) UNIQUE NOT NULL,
                     tmpJobIdHash CHAR(64) NOT NULL,
                     tmpCreate   timestamp without time zone NOT NULL,
                     tmpIsCloneOk SMALLINT DEFAULT 0,
                     PRIMARY KEY(tmpId))';
                 break;
             case 'PDO_SQLITE':
                 $sql = 'CREATE TABLE ' . $this->_name . ' (
                    tmpId    INTEGER,
                    tmpName  CHAR(64) UNIQUE NOT NULL,
                    tmpJobIdHash CHAR(64) NOT NULL,
                    tmpCreate   TIMESTAMP NOT NULL,
                    tmpIsCloneOk INTEGER DEFAULT 0,
                    PRIMARY KEY(tmpId))';
                 break;
         }
         $this->_db->query($sql);
     }
 }
开发者ID:neverstoplwy,项目名称:contrib-webacula,代码行数:59,代码来源:WbTmpTable.php


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