PHP Class Phalcon\Db\Adapter\MongoDB\Operation\ListCollections

See also: MongoDB\Database::listCollections()
See also: http://docs.mongodb.org/manual/reference/command/listCollections/
Inheritance: implements Phalcon\Db\Adapter\MongoDB\Operation\Executable
ファイルを表示 Open project: phalcon/incubator Class Usage Examples

Public Methods

Method Description
__construct ( string $databaseName, array $options = [] ) Constructs a listCollections command.
execute ( MongoDB\Driver\Server $server ) : Phalcon\Db\Adapter\MongoDB\Model\CollectionInfoIterator Execute the operation.

Private Methods

Method Description
executeCommand ( MongoDB\Driver\Server $server ) : CollectionInfoCommandIterator Returns information for all collections in this database using the listCollections command.
executeLegacy ( MongoDB\Driver\Server $server ) : CollectionInfoLegacyIterator Returns information for all collections in this database by querying the "system.namespaces" collection (MongoDB <3.0).

Method Details

__construct() public method

Supported options: * filter (document): Query by which to filter collections. * maxTimeMS (integer): The maximum amount of time to allow the query to run.
public __construct ( string $databaseName, array $options = [] )
$databaseName string Database name
$options array Command options

execute() public method

Execute the operation.
See also: Executable::execute()
public execute ( MongoDB\Driver\Server $server ) : Phalcon\Db\Adapter\MongoDB\Model\CollectionInfoIterator
$server MongoDB\Driver\Server
return Phalcon\Db\Adapter\MongoDB\Model\CollectionInfoIterator