yii\mongodb\Migration::createCollection PHP Метод

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

Creates new collection with the specified options.
public createCollection ( string | array $collection, array $options = [] )
$collection string | array name of the collection
$options array collection options in format: "name" => "value"
    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);
    }