public static function filter($attrValue, array $urlConfig, Logger $logger = null)
	{
		/**
		* Trim the URL to conform with HTML5 then parse it
		* @link http://dev.w3.org/html5/spec/links.html#attr-hyperlink-href
		*/
		$p = self::parseUrl(trim($attrValue));

		$error = self::validateUrl($urlConfig, $p);
		if (!empty($error))
		{
			if (isset($logger))
			{
				$p['attrValue'] = $attrValue;
				$logger->err($error, $p);
			}

			return false;
		}

		return self::rebuildUrl($p);
	}
public static function filter($attrValue, array $urlConfig, Logger $logger = null)
	{
		/**
		* Trim the URL to conform with HTML5 then parse it
		* @link http://dev.w3.org/html5/spec/links.html#attr-hyperlink-href
		*/
		$p = self::parseUrl(trim($attrValue));

		$error = self::validateUrl($urlConfig, $p);
		if (!empty($error))
		{
			if (isset($logger))
			{
				$p['attrValue'] = $attrValue;
				$logger->err($error, $p);
			}

			return false;
		}

		return self::rebuildUrl($p);
	}
public static function filter ( $ attrValue , array $ urlConfig , Logger $ logger = null ) { /**
		* Trim the URL to conform with HTML5 then parse it
		* @link http://dev.w3.org/html5/spec/links.html#attr-hyperlink-href
		*/ $ p = self :: parseUrl ( trim ( $ attrValue ) ) ; $ error = self :: validateUrl ( $ urlConfig , $ p ) ; if ( ! empty ( $ error ) ) { if ( isset ( $ logger ) ) { $ p [ 'attrValue' ] = $ attrValue ; $ logger -> err ( $ error , $ p ) ; } return false ; } return self :: rebuildUrl ( $ p ) ; }
Filter a URL

@param  mixed  $attrValue Original URL
@param  array  $urlConfig URL config
@param  Logger $logger    Parser's logger
@return mixed             Cleaned up URL if valid, FALSE otherwise
Filter a URL