OpenSkill\Datatable\Queries\Parser\Datatable19QueryParser::canParse PHP Method

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
    public function canParse(Request $request)
    {
        return $request->query->has("sEcho");
    }

Usage Example

Ejemplo 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);
 }
All Usage Examples Of OpenSkill\Datatable\Queries\Parser\Datatable19QueryParser::canParse