public static function getAvailableDriver($options, $default = null)
	{
		if (is_null($default))
		{
			$availableAdapters = self::getHttpTransports();
		}
		else
		{
			settype($default, 'array');
			$availableAdapters = $default;
		}

		// Check if there is at least one available http transport adapter
		if (!count($availableAdapters))
		{
			return false;
		}

		foreach ($availableAdapters as $adapter)
		{
			/* @var  $class  TransportInterface */
			$class = 'Joomla\\Http\\Transport\\' . ucfirst($adapter);

			if (class_exists($class))
			{
				if ($class::isSupported())
				{
					return new $class($options);
				}
			}
		}

		return false;
	}
public static function getAvailableDriver($options, $default = null)
	{
		if (is_null($default))
		{
			$availableAdapters = self::getHttpTransports();
		}
		else
		{
			settype($default, 'array');
			$availableAdapters = $default;
		}

		// Check if there is at least one available http transport adapter
		if (!count($availableAdapters))
		{
			return false;
		}

		foreach ($availableAdapters as $adapter)
		{
			/* @var  $class  TransportInterface */
			$class = 'Joomla\\Http\\Transport\\' . ucfirst($adapter);

			if (class_exists($class))
			{
				if ($class::isSupported())
				{
					return new $class($options);
				}
			}
		}

		return false;
	}
public static function getAvailableDriver ( $ options , $ default = null ) { if ( is_null ( $ default ) ) { $ availableAdapters = self :: getHttpTransports ( ) ; } else { settype ( $ default , 'array' ) ; $ availableAdapters = $ default ; } // Check if there is at least one available http transport adapter if ( ! count ( $ availableAdapters ) ) { return false ; } foreach ( $ availableAdapters as $ adapter ) { /* @var  $class  TransportInterface */ $ class = 'Joomla\\Http\\Transport\\' . ucfirst ( $ adapter ) ; if ( class_exists ( $ class ) ) { if ( $ class :: isSupported ( ) ) { return new $ class ( $ options ) ; } } } return false ; }
Finds an available http transport object for communication

@param   array  $options  Option for creating http transport object
@param   mixed  $default  Adapter (string) or queue of adapters (array) to use

@return  TransportInterface  Interface sub-class

@since   1.0
Finds an available http transport object for communication