protected function FindCommand::execute in MongoDB 8.2
File
- modules/
mongodb/ src/ Command/ FindCommand.php, line 100
Class
- FindCommand
- Class FindCommand provides the 'commands.mongodb.find' command.
Namespace
Drupal\mongodb\CommandCode
protected function execute(InputInterface $input, OutputInterface $output) {
// PHP 7.1 list('alias' => $alias ...) syntax is no yet supported in PHPMD.
$arguments = $input
->getArguments();
// These are declared arguments, so they're known to have a value.
$alias = $arguments['alias'];
$collection = $arguments['collection'];
$selector = $arguments['selector'];
$this
->getIo()
->write($this->serialization
->encode($this->tools
->find($alias, $collection, $selector)));
}