ConnectionEventArgs.php 541 Bytes
Newer Older
1 2 3 4
<?php

namespace Doctrine\DBAL\Event;

Benjamin Morel's avatar
Benjamin Morel committed
5 6
use Doctrine\Common\EventArgs;
use Doctrine\DBAL\Connection;
7 8 9 10 11 12

/**
 * Event Arguments used when a Driver connection is established inside Doctrine\DBAL\Connection.
 */
class ConnectionEventArgs extends EventArgs
{
13
    /** @var Connection */
14
    private $connection;
15 16 17

    public function __construct(Connection $connection)
    {
18
        $this->connection = $connection;
19 20 21
    }

    /**
22
     * @return Connection
23 24 25
     */
    public function getConnection()
    {
26
        return $this->connection;
27 28
    }
}