class IsJsonRequestMatcher
Checks the Request content is valid JSON.
@author Fabien Potencier <fabien@symfony.com>
Hierarchy
- class \Symfony\Component\HttpFoundation\RequestMatcher\IsJsonRequestMatcher implements \Symfony\Component\HttpFoundation\RequestMatcherInterface
Expanded class hierarchy of IsJsonRequestMatcher
File
-
vendor/
symfony/ http-foundation/ RequestMatcher/ IsJsonRequestMatcher.php, line 22
Namespace
Symfony\Component\HttpFoundation\RequestMatcherView source
class IsJsonRequestMatcher implements RequestMatcherInterface {
public function matches(Request $request) : bool {
return json_validate($request->getContent());
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
IsJsonRequestMatcher::matches | public | function | Decides whether the rule(s) implemented by the strategy matches the supplied request. | Overrides RequestMatcherInterface::matches |