yii\mongodb\Database::getCollection PHP Метод

getCollection() публичный Метод

Returns the Mongo collection with the given name.
public getCollection ( string $name, boolean $refresh = false ) : Collection
$name string collection name
$refresh boolean whether to reload the collection instance even if it is found in the cache.
Результат Collection Mongo collection instance.
    public function getCollection($name, $refresh = false)
    {
        if ($refresh || !array_key_exists($name, $this->_collections)) {
            $this->_collections[$name] = $this->selectCollection($name);
        }
        return $this->_collections[$name];
    }