Ingo_Storage::__construct PHP 메소드

__construct() 공개 메소드

Constructor.
public __construct ( array $params = [] )
$params array
    public function __construct(array $params = array())
    {
        $this->_params = $params;
    }

Usage Example

예제 #1
0
파일: Mongo.php 프로젝트: raz0rsdge/horde
 /**
  * @param array $params  Parameters:
  *   - collection: (string) The name of the storage collection.
  *   - mongo_db: (Horde_Mongo_Client) [REQUIRED] The DB instance.
  */
 public function __construct(array $params = array())
 {
     if (!isset($params['mongo_db'])) {
         throw new InvalidArgumentException('Missing mongo_db parameter.');
     }
     parent::__construct(array_merge(array('collection' => 'ingo_storage'), $params));
     $this->_params['db'] = $this->_params['mongo_db']->selectCollection(null, $this->_params['collection']);
 }