src/GreenCape/JoomlaCLI/Driver/Factory.php
public function create($basePath)
	{
		$parts = explode('.', $this->loadVersion($basePath)->getShortVersion());
		while (!empty($parts))
		{
			$version = implode('Dot', $parts);
			$classname = __NAMESPACE__ . '\\Joomla' . $version . 'Driver';
			if (class_exists($classname))
			{
				return new $classname;
			}
			array_pop($parts);
		}
		throw new \RuntimeException('No driver found');
	}
public function create($basePath)
	{
		$parts = explode('.', $this->loadVersion($basePath)->getShortVersion());
		while (!empty($parts))
		{
			$version = implode('Dot', $parts);
			$classname = __NAMESPACE__ . '\\Joomla' . $version . 'Driver';
			if (class_exists($classname))
			{
				return new $classname;
			}
			array_pop($parts);
		}
		throw new \RuntimeException('No driver found');
	}
public function create ( $ basePath ) { $ parts = explode ( '.' , $ this -> loadVersion ( $ basePath ) -> getShortVersion ( ) ) ; while ( ! empty ( $ parts ) ) { $ version = implode ( 'Dot' , $ parts ) ; $ classname = __NAMESPACE__ . '\\Joomla' . $ version . 'Driver' ; if ( class_exists ( $ classname ) ) { return new $ classname ; } array_pop ( $ parts ) ; } throw new \ RuntimeException ( 'No driver found' ) ; }
Create a version specific driver to Joomla

@param   string  $basePath  The Joomla base path (same as JPATH_BASE within Joomla)

@return  JoomlaDriver

@throws  \RuntimeException
Create a version specific driver to Joomla