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
 /**
  * @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']);
 }