protected function getDriverImplementation(string $type, array $paths): DriverInterface
    {
        switch ($type) {
            case DriverFactoryInterface::DRIVER_ANNOTATION:
                return $this->getAnnotationDriver($paths);

            case DriverFactoryInterface::DRIVER_PHP:
                return $this->getPhpDriver($paths);

            case DriverFactoryInterface::DRIVER_XML:
                return $this->getXmlDriver($paths);

            case DriverFactoryInterface::DRIVER_JSON:
                return $this->getJsonDriver($paths);

            case DriverFactoryInterface::DRIVER_YAML:
                return $this->getYamlDriver($paths);
        }

        throw new DriverException(
            \sprintf('"%s" is not a valid metadata mapping driver', $type)
        );
    }
protected function getDriverImplementation(string $type, array $paths): DriverInterface
    {
        switch ($type) {
            case DriverFactoryInterface::DRIVER_ANNOTATION:
                return $this->getAnnotationDriver($paths);

            case DriverFactoryInterface::DRIVER_PHP:
                return $this->getPhpDriver($paths);

            case DriverFactoryInterface::DRIVER_XML:
                return $this->getXmlDriver($paths);

            case DriverFactoryInterface::DRIVER_JSON:
                return $this->getJsonDriver($paths);

            case DriverFactoryInterface::DRIVER_YAML:
                return $this->getYamlDriver($paths);
        }

        throw new DriverException(
            \sprintf('"%s" is not a valid metadata mapping driver', $type)
        );
    }
protected function getDriverImplementation ( string $ type , array $ paths ) : DriverInterface { switch ( $ type ) { case DriverFactoryInterface :: DRIVER_ANNOTATION : return $ this -> getAnnotationDriver ( $ paths ) ; case DriverFactoryInterface :: DRIVER_PHP : return $ this -> getPhpDriver ( $ paths ) ; case DriverFactoryInterface :: DRIVER_XML : return $ this -> getXmlDriver ( $ paths ) ; case DriverFactoryInterface :: DRIVER_JSON : return $ this -> getJsonDriver ( $ paths ) ; case DriverFactoryInterface :: DRIVER_YAML : return $ this -> getYamlDriver ( $ paths ) ; } throw new DriverException ( \ sprintf ( '"%s" is not a valid metadata mapping driver' , $ type ) ) ; }
Get mapping driver implementation.

@param string $type
@param array  $paths

@throws DriverException

@return DriverInterface
Get mapping driver implementation .