public function getCollection($name, $refresh = false)
    {
        if ($refresh || !array_key_exists($name, $this->_collections)) {
            $this->_collections[$name] = $this->selectCollection($name);
        }

        return $this->_collections[$name];
    }
public function getCollection($name, $refresh = false)
    {
        if ($refresh || !array_key_exists($name, $this->_collections)) {
            $this->_collections[$name] = $this->selectCollection($name);
        }

        return $this->_collections[$name];
    }
public function getCollection ( $ name , $ refresh = false ) { if ( $ refresh || ! array_key_exists ( $ name , $ this -> _collections ) ) { $ this -> _collections [ $ name ] = $ this -> selectCollection ( $ name ) ; } return $ this -> _collections [ $ name ] ; }
Returns the Mongo collection with the given name.
@param string $name collection name
@param bool $refresh whether to reload the collection instance even if it is found in the cache.
@return Collection Mongo collection instance.
Returns the Mongo collection with the given name .