/** * Get a exporter driver instance * * @param string $type The type to get (yml, xml, etc.) * @param string $source The directory where the exporter will export to * @return AbstractExporter $exporter */ public function getExporter($type, $source = null) { if (!isset($this->_exporterDrivers[$type])) { throw DoctrineException::invalidExporterDriverType($type); } $class = $this->_exporterDrivers[$type]; return new $class($source); }