public function AcceptHeader::filter in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-foundation/AcceptHeader.php \Symfony\Component\HttpFoundation\AcceptHeader::filter()
Filters items on their value using given regex.
Parameters
string $pattern:
Return value
File
- vendor/
symfony/ http-foundation/ AcceptHeader.php, line 133
Class
- AcceptHeader
- Represents an Accept-* header.
Namespace
Symfony\Component\HttpFoundationCode
public function filter($pattern) {
return new self(array_filter($this->items, function (AcceptHeaderItem $item) use ($pattern) {
return preg_match($pattern, $item
->getValue());
}));
}