Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | List of all members
eZ\Bundle\EzPublishRestBundle\EventListener\RequestListener Class Reference

REST request listener. More...

Inheritance diagram for eZ\Bundle\EzPublishRestBundle\EventListener\RequestListener:

## Public Member Functions
| onKernelRequest (GetResponseEvent $event)
| If the request is a REST one, sets the is_rest_request request attribute. More...

## Static Public Member Functions
static | getSubscribedEvents ()

## Public Attributes
const | REST_PREFIX_PATTERN = '/^\/api\/[a-zA-Z0-9-_]+\/v\d+(\.\d+)?\//'

## Protected Member Functions
| hasRestPrefix (Request $request)

## Detailed Description

REST request listener.

Flags a REST request as such using the is_rest_request attribute.

Definition at line 19 of file RequestListener.php.

## Member Function Documentation

## ◆ getSubscribedEvents()

static eZ\Bundle\EzPublishRestBundle\EventListener\RequestListener::getSubscribedEvents | ( |  | ) |
| static

Returns
  array

Definition at line 26 of file RequestListener.php.

## ◆ hasRestPrefix()

eZ\Bundle\EzPublishRestBundle\EventListener\RequestListener::hasRestPrefix | ( | Request | $request | ) |
| protected

Parameters

  \Symfony\Component\HttpFoundation\Request | $request |

Returns
  bool

Definition at line 55 of file RequestListener.php.

Referenced by eZ\Bundle\EzPublishRestBundle\EventListener\RequestListener\onKernelRequest().

## ◆ onKernelRequest()

eZ\Bundle\EzPublishRestBundle\EventListener\RequestListener::onKernelRequest | ( | GetResponseEvent | $event | ) |

If the request is a REST one, sets the is_rest_request request attribute.

Parameters

  \Symfony\Component\HttpKernel\Event\GetResponseEvent | $event |

Definition at line 39 of file RequestListener.php.

References eZ\Bundle\EzPublishRestBundle\EventListener\RequestListener\hasRestPrefix().

## Member Data Documentation

## ◆ REST_PREFIX_PATTERN

const eZ\Bundle\EzPublishRestBundle\EventListener\RequestListener::REST_PREFIX_PATTERN = '/^\/api\/[a-zA-Z0-9-_]+\/v\d+(\.\d+)?\//'

Definition at line 21 of file RequestListener.php.

The documentation for this class was generated from the following file:

- RequestListener.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.