MongoLite\Database::selectCollection PHP Method

selectCollection() public method

Select collection
public selectCollection ( string $name ) : object
$name string
return object
    public function selectCollection($name)
    {
        if (!isset($this->collections[$name])) {
            if (!in_array($name, $this->getCollectionNames())) {
                $this->createCollection($name);
            }
            $this->collections[$name] = new Collection($name, $this);
        }
        return $this->collections[$name];
    }