Phalcon\Db\Adapter\MongoDB\Operation\ListCollections::executeLegacy PHP Метод

executeLegacy() приватный Метод

Returns information for all collections in this database by querying the "system.namespaces" collection (MongoDB <3.0).
private executeLegacy ( MongoDB\Driver\Server $server ) : CollectionInfoLegacyIterator
$server MongoDB\Driver\Server
Результат Phalcon\Db\Adapter\MongoDB\Model\CollectionInfoLegacyIterator
    private function executeLegacy(Server $server)
    {
        $filter = empty($this->options['filter']) ? [] : (array) $this->options['filter'];
        if (array_key_exists('name', $filter)) {
            if (!is_string($filter['name'])) {
                throw InvalidArgumentException::invalidType('filter name for MongoDB <3.0', $filter['name'], 'string');
            }
            $filter['name'] = $this->databaseName . '.' . $filter['name'];
        }
        $options = isset($this->options['maxTimeMS']) ? ['modifiers' => ['$maxTimeMS' => $this->options['maxTimeMS']]] : [];
        $cursor = $server->executeQuery($this->databaseName . '.system.namespaces', new Query($filter, $options));
        $cursor->setTypeMap(['root' => 'array', 'document' => 'array']);
        return new CollectionInfoLegacyIterator($cursor);
    }