protected function getResults(string $username, ServerRequestInterface $request): \MongoDB\Driver\Cursor
    {
        $q = new \MongoDB\Driver\Query(
            array_merge($this->query, [($this->fieldUser) => $username]),
            ['projection' => [($this->fieldUser) => true, ($this->fieldPass) => true]]
        );
        return $this->manager->executeQuery($this->collection, $q, $this->rp);
    }
protected function getResults(string $username, ServerRequestInterface $request): \MongoDB\Driver\Cursor
    {
        $q = new \MongoDB\Driver\Query(
            array_merge($this->query, [($this->fieldUser) => $username]),
            ['projection' => [($this->fieldUser) => true, ($this->fieldPass) => true]]
        );
        return $this->manager->executeQuery($this->collection, $q, $this->rp);
    }
protected function getResults ( string $ username , ServerRequestInterface $ request ) : \ MongoDB \ Driver \ Cursor { $ q = new \ MongoDB \ Driver \ Query ( array_merge ( $ this -> query , [ ( $ this -> fieldUser ) => $ username ] ) , [ 'projection' => [ ( $ this -> fieldUser ) => true , ( $ this -> fieldPass ) => true ] ] ) ; return $ this -> manager -> executeQuery ( $ this -> collection , $ q , $ this -> rp ) ; }
Queries the MongoDB collection.

@param string $username The username to use for parameter binding
@param ServerRequestInterface $request The Server Request message (to use for additional parameter binding)
@return \MongoDB\Driver\Cursor The results cursor
Queries the MongoDB collection .