static protected function buildPatternFromScheme(URLScheme $scheme)
    {
		// generate a unique random string
		$uniq = md5(mt_rand());

		// replace the wildcard sub-domain if exists
		$scheme = str_replace(
			'://'.self::WILDCARD_CHARACTER.'.',
			'://'.$uniq,
			$scheme->__tostring()
		);

		// replace the wildcards
		$scheme = str_replace(
			self::WILDCARD_CHARACTER,
			$uniq,
			$scheme
		);

		// set the pattern wrap
		$wrap = '|';

		// quote the pattern
		$pattern = preg_quote($scheme, $wrap);

		// replace the unique string by the character class
		$pattern = str_replace($uniq, '.*', $pattern);

		return $wrap.$pattern.$wrap.'iu';
    }
static protected function buildPatternFromScheme(URLScheme $scheme)
    {
		// generate a unique random string
		$uniq = md5(mt_rand());

		// replace the wildcard sub-domain if exists
		$scheme = str_replace(
			'://'.self::WILDCARD_CHARACTER.'.',
			'://'.$uniq,
			$scheme->__tostring()
		);

		// replace the wildcards
		$scheme = str_replace(
			self::WILDCARD_CHARACTER,
			$uniq,
			$scheme
		);

		// set the pattern wrap
		$wrap = '|';

		// quote the pattern
		$pattern = preg_quote($scheme, $wrap);

		// replace the unique string by the character class
		$pattern = str_replace($uniq, '.*', $pattern);

		return $wrap.$pattern.$wrap.'iu';
    }
static protected function buildPatternFromScheme ( URLScheme $ scheme ) { // generate a unique random string $ uniq = md5 ( mt_rand ( ) ) ; // replace the wildcard sub-domain if exists $ scheme = str_replace ( '://' . self :: WILDCARD_CHARACTER . '.' , '://' . $ uniq , $ scheme -> __tostring ( ) ) ; // replace the wildcards $ scheme = str_replace ( self :: WILDCARD_CHARACTER , $ uniq , $ scheme ) ; // set the pattern wrap $ wrap = '|' ; // quote the pattern $ pattern = preg_quote ( $ scheme , $ wrap ) ; // replace the unique string by the character class $ pattern = str_replace ( $ uniq , '.*' , $ pattern ) ; return $ wrap . $ pattern . $ wrap . 'iu' ; }
Builds pattern from scheme

@return string
Builds pattern from scheme