public function getDriver()
    {
        $class = $this->driverOptions['class'];

        if (!class_exists($class)) {
            throw new \ErrorException("Class '".$class."' not found in ".get_class($this));
        }

        if ($class === self::DATABASE_DRIVER) {
            $driver = $this->dbDriver;
            $driver->setOptions($this->driverOptions['options']);
        } else {
            $driver = new $class($this->driverOptions['options']);
        }

        $driver->setTranslator($this->translator);

        return $driver;
    }
public function getDriver()
    {
        $class = $this->driverOptions['class'];

        if (!class_exists($class)) {
            throw new \ErrorException("Class '".$class."' not found in ".get_class($this));
        }

        if ($class === self::DATABASE_DRIVER) {
            $driver = $this->dbDriver;
            $driver->setOptions($this->driverOptions['options']);
        } else {
            $driver = new $class($this->driverOptions['options']);
        }

        $driver->setTranslator($this->translator);

        return $driver;
    }
public function getDriver ( ) { $ class = $ this -> driverOptions [ 'class' ] ; if ( ! class_exists ( $ class ) ) { throw new \ ErrorException ( "Class '" . $ class . "' not found in " . get_class ( $ this ) ) ; } if ( $ class === self :: DATABASE_DRIVER ) { $ driver = $ this -> dbDriver ; $ driver -> setOptions ( $ this -> driverOptions [ 'options' ] ) ; } else { $ driver = new $ class ( $ this -> driverOptions [ 'options' ] ) ; } $ driver -> setTranslator ( $ this -> translator ) ; return $ driver ; }
Return the driver

@return mixed
@throws \ErrorException
Return the driver