/** * @param BuilderInterface $builder * @return Grammar */ protected function createGrammar(BuilderInterface $builder) { $driverName = $builder->getConnection()->getDriverName(); if (!isset($this->grammars[$driverName])) { throw new BadMethodCallException("Grammar class for the driver '{$driverName}' is not defined.'"); } $cls = $this->grammars[$driverName]; return new $cls(); }
/** * @return string */ public function getDriverName() { return $this->builder->getConnection()->getDriverName(); }