コード例 #1
0
ファイル: mongoCrud.php プロジェクト: mpcmf/mpcmf-core
 /**
  * @return mongoInstance
  * @throws storageException
  */
 public function storage()
 {
     if ($this->storageInstance === null) {
         $config = config::getConfig(get_called_class());
         $this->mongoCrudStorageConfig = $config['storage'];
         if (!array_key_exists('configSection', $this->mongoCrudStorageConfig)) {
             throw new storageException('Unable to find config[storage][configSection] in case of mongoCrud usage');
         }
         $this->storageInstance = mongoInstance::factory($this->mongoCrudStorageConfig['configSection']);
     }
     return $this->storageInstance;
 }
コード例 #2
0
 /**
  * @return mongoInstance
  */
 protected function storage()
 {
     if ($this->mongoInstance === null) {
         $this->mongoInstance = mongoInstance::factory($this->config['configSection']);
     }
     return $this->mongoInstance;
 }