UserAgentListener
in package
implements
EventSubscriberInterface
Listener used to append strings to the User-Agent header of a request based on the `ua.append` option. `ua.append` can contain a string or array of values.
Table of Contents
Interfaces
- EventSubscriberInterface
- An EventSubscriber knows himself what events he is interested in.
Constants
- OPTION = 'ua.append'
Methods
- getSubscribedEvents() : array<string|int, mixed>
- Returns an array of event names this subscriber wants to listen to.
- onBeforeSend() : mixed
- Adds strings to the User-Agent header using the `ua.append` parameter of a command
Constants
OPTION
public
string
OPTION
= 'ua.append'
Option used to store User-Agent modifiers
Methods
getSubscribedEvents()
Returns an array of event names this subscriber wants to listen to.
public
static getSubscribedEvents() : array<string|int, mixed>
Return values
array<string|int, mixed> —The event names to listen to
onBeforeSend()
Adds strings to the User-Agent header using the `ua.append` parameter of a command
public
onBeforeSend(Event $event) : mixed
Parameters
- $event : Event
-
Event emitted