public function createCollection($collection, $options = [])
    {
        if (is_array($collection)) {
            list($database, $collectionName) = $collection;
        } else {
            $database = null;
            $collectionName = $collection;
        }
        $this->beginProfile($token = "    > create collection " . $this->composeCollectionLogName($collection) . " ...");
        $this->db->getDatabase($database)->createCollection($collectionName, $options);
        $this->endProfile($token);
    }
public function createCollection($collection, $options = [])
    {
        if (is_array($collection)) {
            list($database, $collectionName) = $collection;
        } else {
            $database = null;
            $collectionName = $collection;
        }
        $this->beginProfile($token = "    > create collection " . $this->composeCollectionLogName($collection) . " ...");
        $this->db->getDatabase($database)->createCollection($collectionName, $options);
        $this->endProfile($token);
    }
public function createCollection ( $ collection , $ options = [ ] ) { if ( is_array ( $ collection ) ) { list ( $ database , $ collectionName ) = $ collection ; } else { $ database = null ; $ collectionName = $ collection ; } $ this -> beginProfile ( $ token = "    > create collection " . $ this -> composeCollectionLogName ( $ collection ) . " ..." ) ; $ this -> db -> getDatabase ( $ database ) -> createCollection ( $ collectionName , $ options ) ; $ this -> endProfile ( $ token ) ; }
Creates new collection with the specified options.
@param string|array $collection name of the collection
@param array $options collection options in format: "name" => "value"
Creates new collection with the specified options .