canParse() public method

Method to determine if this parser can handle the query parameters. If so then the parser should return true and be able to return a DTQueryConfiguration
public canParse ( Request $request ) : boolean
$request Symfony\Component\HttpFoundation\Request The current request, that should be investigated
return boolean true if the parser is able to parse the query parameters and to return a DTQueryConfiguration
Esempio n. 1
0
 /**
  * Method to determine if this parser can handle the query parameters. If so then the parser should return true
  * and be able to return a DTQueryConfiguration
  *
  * @return bool true if the parser is able to parse the query parameters and to return a DTQueryConfiguration
  */
 public function canParseRequest()
 {
     $request = $this->requestStack->getCurrentRequest();
     if (is_null($request)) {
         throw new \InvalidArgumentException("Can not determine a request that is null");
     }
     return $this->queryParser->canParse($request);
 }
 public function testCanParse()
 {
     $this->assertTrue($this->parser->canParse($this->request));
 }