public static function resolveAliases(array $parameters, array $aliases)
	{
		if ( !isset($parameters['alias']) ) {
			return $parameters;
		}

		$browser_alias = $parameters['alias'];
		unset($parameters['alias']);

		if ( isset($aliases[$browser_alias]) ) {
			$candidate_params = self::arrayMergeRecursive($aliases[$browser_alias], $parameters);

			return self::resolveAliases($candidate_params, $aliases);
		}

		throw new \InvalidArgumentException(sprintf('Unable to resolve "%s" browser alias', $browser_alias));
	}
public static function resolveAliases(array $parameters, array $aliases)
	{
		if ( !isset($parameters['alias']) ) {
			return $parameters;
		}

		$browser_alias = $parameters['alias'];
		unset($parameters['alias']);

		if ( isset($aliases[$browser_alias]) ) {
			$candidate_params = self::arrayMergeRecursive($aliases[$browser_alias], $parameters);

			return self::resolveAliases($candidate_params, $aliases);
		}

		throw new \InvalidArgumentException(sprintf('Unable to resolve "%s" browser alias', $browser_alias));
	}
public static function resolveAliases ( array $ parameters , array $ aliases ) { if ( ! isset ( $ parameters [ 'alias' ] ) ) { return $ parameters ; } $ browser_alias = $ parameters [ 'alias' ] ; unset ( $ parameters [ 'alias' ] ) ; if ( isset ( $ aliases [ $ browser_alias ] ) ) { $ candidate_params = self :: arrayMergeRecursive ( $ aliases [ $ browser_alias ] , $ parameters ) ; return self :: resolveAliases ( $ candidate_params , $ aliases ) ; } throw new \ InvalidArgumentException ( sprintf ( 'Unable to resolve "%s" browser alias' , $ browser_alias ) ) ; }
Resolves browser alias into corresponding browser configuration.

@param array $parameters Browser configuration.
@param array $aliases    Browser configuration aliases.

@return array
@throws \InvalidArgumentException When unable to resolve used browser alias.
Resolves browser alias into corresponding browser configuration .