eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\LegacyStorage::setConnection PHP Метод

setConnection() публичный Метод

Set database handler for this gateway.
public setConnection ( mixed $dbHandler )
$dbHandler mixed
    public function setConnection($dbHandler)
    {
        // This obviously violates the Liskov substitution Principle, but with
        // the given class design there is no sane other option. Actually the
        // dbHandler *should* be passed to the constructor, and there should
        // not be the need to post-inject it.
        if (!$dbHandler instanceof \eZ\Publish\Core\Persistence\Database\DatabaseHandler) {
            throw new \RuntimeException('Invalid dbHandler passed');
        }
        $this->dbHandler = $dbHandler;
    }