當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Zend_Db_Table_Abstract::__construct方法代碼示例

本文整理匯總了PHP中Zend_Db_Table_Abstract::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Db_Table_Abstract::__construct方法的具體用法?PHP Zend_Db_Table_Abstract::__construct怎麽用?PHP Zend_Db_Table_Abstract::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Zend_Db_Table_Abstract的用法示例。


在下文中一共展示了Zend_Db_Table_Abstract::__construct方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 public function __construct($config = null)
 {
     if (isset($this->_use_adapter)) {
         $config = $this->_use_adapter;
     }
     return parent::__construct($config);
 }
開發者ID:IASA-GR,項目名稱:appdb-core,代碼行數:7,代碼來源:ZendDBTableBase.php

示例2: __construct

 public function __construct($config = array())
 {
     parent::__construct($config);
     if (!$this->_cache || $this->_cache === TRUE) {
         $this->_cache = CachePlugin::init();
     }
 }
開發者ID:adrianosouzas,項目名稱:calculo-tributos,代碼行數:7,代碼來源:AbstractDbTable.php

示例3: __construct

 public function __construct()
 {
     $this->_config = Zend_Registry::get('config');
     $this->_cache = Zend_Registry::get('cache');
     $this->_auth = Zend_Registry::get('auth');
     parent::__construct();
 }
開發者ID:rwebley,項目名稱:Beowulf---PAS,代碼行數:7,代碼來源:Abstract.php

示例4: __construct

    /**
     * __construct() - For concrete implementation of Zend_Db_Table
     *
     * @param string|array $config string can reference a Zend_Registry key for a db adapter
     *                             OR it can reference the name of a table
     * @param array|Zend_Db_Table_Definition $definition
     */
     
     
    public function __construct($config = array(), $definition = null)
    {
        if ($definition !== null && is_array($definition)) {
            $definition = new Zend_Db_Table_Definition($definition);
        }

        if (is_string($config)) {
            if (Zend_Registry::isRegistered($config)) {
                trigger_error(__CLASS__ . '::' . __METHOD__ . '(\'registryName\') is not valid usage of Zend_Db_Table, '
                    . 'try extending Zend_Db_Table_Abstract in your extending classes.',
                    E_USER_NOTICE
                    );
                $config = array(self::ADAPTER => $config);
            } else {
                // process this as table with or without a definition
                if ($definition instanceof Zend_Db_Table_Definition
                    && $definition->hasTableConfig($config)) {
                    // this will have DEFINITION_CONFIG_NAME & DEFINITION
                    $config = $definition->getTableConfig($config);
                } else {
                    $config = array(self::NAME => $config);
                }
            }
        }

        parent::__construct($config);
    }
開發者ID:hungnv0789,項目名稱:vhtm,代碼行數:36,代碼來源:Table.php

示例5: __construct

 public function __construct()
 {
     if (isset($this->_use_adapter)) {
         $config = Zend_Registry::get($this->_use_adapter);
     }
     return parent::__construct($config);
 }
開發者ID:peppolypus,項目名稱:Sistemi-Multimediali,代碼行數:7,代碼來源:Abstract.php

示例6: __construct

 public function __construct($config = NULL)
 {
     parent::__construct($config);
     if (!$this->table_exists()) {
         $this->create_table();
     }
 }
開發者ID:BGCX262,項目名稱:zupal-svn-to-git,代碼行數:7,代碼來源:Abstract.php

示例7: __construct

 /** Construct the objects
  * @access public
  */
 public function __construct()
 {
     $this->_config = Zend_Registry::get('config');
     $this->_cache = Zend_Registry::get('cache');
     $this->_auth = Zend_Registry::get('auth');
     $this->_user = new Pas_User_Details();
     parent::__construct();
 }
開發者ID:lesleyauk,項目名稱:findsorguk,代碼行數:11,代碼來源:Abstract.php

示例8: __construct

 /**
  * Constructor
  * 
  * @param array $config
  * @param array $filters 
  */
 public function __construct(array $config = array(), array $filters = array())
 {
     parent::__construct($config);
     $this->_db = $config['db'];
     $this->_table = $config['name'];
     $this->_parentField = $config['primary'][0];
     $this->_filters = $filters;
 }
開發者ID:bsa-git,項目名稱:zf-myblog,代碼行數:14,代碼來源:Profile.php

示例9:

 function App_Db_Table_Abstract($config = null)
 {
     if (isset($this->_use_adapter)) {
         $dbAdapters = Zend_Registry::get('dbAdapters');
         $config = $dbAdapters[$this->_use_adapter];
     }
     return parent::__construct($config);
 }
開發者ID:neffers,項目名稱:Nefcraft,代碼行數:8,代碼來源:App_Db_Table_Abstract.php

示例10:

 function Kutu_Core_Orm_CoreDb($config = null)
 {
     if (isset($this->_use_adapter)) {
         $dbAdapters = Zend_Registry::get('dbAdapters');
         $config = $dbAdapters[$this->_use_adapter];
     }
     return parent::__construct($config);
 }
開發者ID:hukumonline,項目名稱:idh,代碼行數:8,代碼來源:CoreDb.php

示例11: __construct

 public function __construct()
 {
     // Create new PHPExcel object
     $this->objPHPExcel = new PHPExcel();
     // Set properties
     $this->objPHPExcel->getProperties()->setCreator("Resolvo")->setLastModifiedBy("Maarten Balliauw")->setTitle("Office 2007 XLSX Test Document")->setSubject("Office 2007 XLSX Test Document")->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.")->setKeywords("office 2007 openxml php")->setCategory("Test result file");
     parent::__construct();
 }
開發者ID:pingitgroup,項目名稱:stockpingitgroup,代碼行數:8,代碼來源:ExportExcelClass.php

示例12: __construct

 /**
  *   __construct
  *
  *   Content constructor.
  *
  *   @param integer $id Content id value.
  */
 public function __construct($id = -1)
 {
     parent::__construct();
     $this->_id = $id;
     if ($id != -1) {
         $this->_data = $this->find((int) $id)->current();
     }
     // end if
 }
開發者ID:jannev,項目名稱:site,代碼行數:16,代碼來源:Content.php

示例13: __construct

 public function __construct($config = array())
 {
     $this->_config = Zend_Registry::get('config');
     $this->_log = Zend_Registry::get('log');
     $this->_prefix = $this->_name . '_';
     $this->_db = $this->getAdapter();
     //$this->_cache = Zend_Registry::get('cache');
     parent::__construct($config);
 }
開發者ID:josmel,項目名稱:DevelEntretenimientoEntel,代碼行數:9,代碼來源:Abstract.php

示例14: __construct

 public function __construct($config = array())
 {
     parent::__construct($config);
     $this->_cache = Digitalus_Cache_Manager::getInstance();
     /**
      * @var Digitalus_Db_Cache
      */
     $this->cache = new Digitalus_Db_Cache($this);
 }
開發者ID:ngukho,項目名稱:ducbui-cms,代碼行數:9,代碼來源:Table.php

示例15: __construct

 /**
  * In addition to regular constructor, remove cascading write operations performed by Zend_Db_Table*,
  * if the DB already supports DRI (see notes for "db.DRI" in config/config.ini).
  */
 public function __construct(array $config = array())
 {
     parent::__construct($config);
     $registry = Zend_Registry::getInstance();
     // if DB supports DRI, disable cascading deletes within Zend_Db_Table*
     if ($registry['config']->db->DRI) {
         unset($this->_referenceMap['Post']['onDelete']);
     }
 }
開發者ID:jorgenils,項目名稱:zend-framework,代碼行數:13,代碼來源:Attachments.php


注:本文中的Zend_Db_Table_Abstract::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。