public function getAdapter($type)
	{
		$type = strtolower($type);

		if (!isset($this->adapters[$type]))
		{
			// Try to load the adapter object
			/* @var  ExtractableInterface  $class */
			$class = 'Joomla\\Archive\\' . ucfirst($type);

			if (!class_exists($class) || !$class::isSupported())
			{
				throw new \InvalidArgumentException(
					sprintf(
						'Archive adapter "%s" (class "%s") not found or supported.',
						$type,
						$class
					)
				);
			}

			$this->adapters[$type] = new $class($this->options);
		}

		return $this->adapters[$type];
	}
public function getAdapter($type)
	{
		$type = strtolower($type);

		if (!isset($this->adapters[$type]))
		{
			// Try to load the adapter object
			/* @var  ExtractableInterface  $class */
			$class = 'Joomla\\Archive\\' . ucfirst($type);

			if (!class_exists($class) || !$class::isSupported())
			{
				throw new \InvalidArgumentException(
					sprintf(
						'Archive adapter "%s" (class "%s") not found or supported.',
						$type,
						$class
					)
				);
			}

			$this->adapters[$type] = new $class($this->options);
		}

		return $this->adapters[$type];
	}
public function getAdapter ( $ type ) { $ type = strtolower ( $ type ) ; if ( ! isset ( $ this -> adapters [ $ type ] ) ) { // Try to load the adapter object /* @var  ExtractableInterface  $class */ $ class = 'Joomla\\Archive\\' . ucfirst ( $ type ) ; if ( ! class_exists ( $ class ) || ! $ class :: isSupported ( ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Archive adapter "%s" (class "%s") not found or supported.' , $ type , $ class ) ) ; } $ this -> adapters [ $ type ] = new $ class ( $ this -> options ) ; } return $ this -> adapters [ $ type ] ; }
Get a file compression adapter.

@param   string  $type  The type of adapter (bzip2|gzip|tar|zip).

@return  ExtractableInterface  Adapter for the requested type

@since   1.0
@throws  \InvalidArgumentException
Get a file compression adapter .