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


PHP Kwf_Model_Abstract::__construct方法代碼示例

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


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

示例1: __construct

 public function __construct(array $config = array())
 {
     if (isset($config['amazon'])) {
         $this->_amazon = (array) $config['amazon'];
     }
     parent::__construct($config);
 }
開發者ID:xiaoguizhidao,項目名稱:koala-framework,代碼行數:7,代碼來源:Nodes.php

示例2: __construct

 public function __construct(array $config = array())
 {
     if (isset($config['proxyModel'])) {
         $this->_proxyModel = $config['proxyModel'];
     }
     parent::__construct($config);
 }
開發者ID:xiaoguizhidao,項目名稱:koala-framework,代碼行數:7,代碼來源:Proxy.php

示例3: __construct

 public function __construct(array $config = array())
 {
     if (isset($config['fieldName'])) {
         $this->_fieldName = $config['fieldName'];
     }
     if (isset($config['columns'])) {
         $this->_columns = (array) $config['columns'];
     }
     parent::__construct($config);
 }
開發者ID:xiaoguizhidao,項目名稱:koala-framework,代碼行數:10,代碼來源:Field.php

示例4: __construct

 public function __construct(array $config = array())
 {
     if (!isset($config['db'])) {
         $config['db'] = Kwf_Registry::get('dao')->getMongoDb();
     }
     if (isset($config['collection'])) {
         $this->_collection = $config['collection'];
     }
     if (is_string($this->_collection)) {
         $this->_collection = $config['db']->{$this->_collection};
     }
     parent::__construct($config);
 }
開發者ID:xiaoguizhidao,項目名稱:koala-framework,代碼行數:13,代碼來源:Mongo.php

示例5: __construct

 public function __construct($config = array())
 {
     if (isset($config['tableName'])) {
         $this->_table = new $config['tableName']();
     }
     if (isset($config['table'])) {
         $this->_table = $config['table'];
     }
     if (isset($config['db'])) {
         $this->_db = $config['db'];
     }
     parent::__construct($config);
 }
開發者ID:nsams,項目名稱:koala-framework,代碼行數:13,代碼來源:Db.php

示例6: __construct

 public function __construct(array $config = array())
 {
     if (isset($config['models'])) {
         $this->_models = (array) $config['models'];
     }
     if (isset($config['columnMapping'])) {
         $this->_columnMapping = $config['columnMapping'];
     }
     if (!$this->_models) {
         throw new Kwf_Exception("models setting is required");
     }
     if (!$this->_columnMapping) {
         throw new Kwf_Exception("columnMapping setting is required");
     }
     $allDb = true;
     foreach ($this->_models as $k => $i) {
         if (is_numeric(substr($k, -1))) {
             if (!$this->_columnMapping) {
                 throw new Kwf_Exception("model key '{$k}' must not end numeric");
             }
         }
         foreach (array_keys($this->_models) as $key) {
             if ($key != $k && substr($k, 0, strlen($key)) == $key) {
                 throw new Kwf_Exception("Invalid key '{$k}', another key ('{$key}') also starts with this string");
             }
         }
         if (is_array($i)) {
             if (!isset($i['model'])) {
                 throw new Kwf_Exception("model key for models setting is required");
             }
             if (isset($i['select'])) {
                 $this->_mergeSelects[$k] = $i['select'];
             }
             $i = $i['model'];
         }
         $i = Kwf_Model_Abstract::getInstance($i);
         $this->_models[$k] = $i;
         if (!$i->getFactoryConfig()) {
             $i->setFactoryConfig(array('type' => 'UnionSource', 'union' => $this, 'modelKey' => $k));
         }
         while ($i instanceof Kwf_Model_Proxy) {
             $i = $i->getProxyModel();
         }
         if (!$i instanceof Kwf_Model_Db) {
             $allDb = false;
         }
     }
     $this->_allDb = $allDb;
     parent::__construct($config);
 }
開發者ID:koala-framework,項目名稱:koala-framework,代碼行數:50,代碼來源:Union.php

示例7: __construct

 public function __construct(array $config = array())
 {
     if (!isset($config['filename'])) {
         throw new Kwf_Exception('No CSV file found');
     }
     if (isset($config['headRow'])) {
         $this->_headRow = $config['headRow'];
     }
     if (!isset($config['delimiter'])) {
         throw new Kwf_Exception('Please set a delimiter');
     }
     $this->_filename = $config['filename'];
     $this->_delimiter = $config['delimiter'];
     parent::__construct($config);
 }
開發者ID:xiaoguizhidao,項目名稱:koala-framework,代碼行數:15,代碼來源:CSV.php

示例8: __construct

 public function __construct(array $config = array())
 {
     if (isset($config['data'])) {
         $this->setData($config['data']);
     }
     if (isset($config['autoId'])) {
         (int) ($this->_autoId = $config['autoId']);
     }
     if (isset($config['columns'])) {
         $this->_columns = (array) $config['columns'];
     }
     if (isset($config['primaryKey'])) {
         $this->_primaryKey = (string) $config['primaryKey'];
     }
     if (isset($config['uniqueColumns'])) {
         $this->_uniqueColumns = (array) $config['uniqueColumns'];
     }
     parent::__construct($config);
 }
開發者ID:koala-framework,項目名稱:koala-framework,代碼行數:19,代碼來源:Abstract.php


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