MysqlSessionInit
in package
implements
EventSubscriber
MySQL Session Init Event Subscriber which allows to set the Client Encoding of the Connection.
Tags
Interfaces, Classes and Traits
- EventSubscriber
- An EventSubscriber knows himself what events he is interested in.
Table of Contents
- $_charset : string
- The charset.
- $_collation : string|bool
- The collation, or FALSE if no collation.
- __construct() : mixed
- Configure Charset and Collation options of MySQL Client for each Connection.
- getSubscribedEvents() : array<string|int, mixed>
- Returns an array of events this subscriber wants to listen to.
- postConnect() : void
Properties
$_charset
The charset.
private
string
$_charset
$_collation
The collation, or FALSE if no collation.
private
string|bool
$_collation
Methods
__construct()
Configure Charset and Collation options of MySQL Client for each Connection.
public
__construct([string $charset = 'utf8' ][, string|bool $collation = false ]) : mixed
Parameters
- $charset : string = 'utf8'
-
The charset.
- $collation : string|bool = false
-
The collation, or FALSE if no collation.
Return values
mixed —getSubscribedEvents()
Returns an array of events this subscriber wants to listen to.
public
getSubscribedEvents() : array<string|int, mixed>
Return values
array<string|int, mixed> —postConnect()
public
postConnect(ConnectionEventArgs $args) : void
Parameters
- $args : ConnectionEventArgs