/** * @param DriverInterface $driver * @param array $configs * @throws DriverNotInstalledException * @return DriverAdapterInterface */ public function setDriver(DriverInterface $driver, array $configs = []) { $driver->boot($configs); if (true !== $driver->check()) { throw new DriverNotInstalledException(sprintf('%s sürücünüz kullanıma hazır değil.', get_class($driver))); } return $this->adapter($driver); }