make the match

@param string|null $url
@return bool
764161
public function match($url = null)
    {
        $match = parent::match($url);

        $find = $this->replaceParameters();

        if (false !== $find || true === $match) {
            return true;
        } else {
            return false;
        }
    }
1227713
public function purgeUrl ($url = null)
    {
        $apiKey = $this->settings->apiKey;

        Craft::trace(
            Craft::t(
                'imgix',
                'Purging asset: {url}', [ 'url' => $url ]
            ),
            'imgix');

        try {
            $client = Craft::createGuzzleClient([ 'timeout' => 30, 'connect_timeout' => 30 ]);

            $response = $client->post(self::IMGIX_PURGE_ENDPOINT, [
                'auth'        => [
                    $apiKey, ''
                ],
                'form_params' => [
                    'url' => $url,
                ]
            ]);

            Craft::trace(
                Craft::t(
                    'imgix',
                    'Purged asset: {url} - Status code {statusCode}', [
                        'url'        => $url,
                        'statusCode' => $response->getStatusCode()
                    ]
                ),
                'imgix');

            return $response->getStatusCode() >= 200 && $response->getStatusCode() < 400;
        }
        catch (RequestException $e) {
            Craft::error(
                Craft::t(
                    'imgix',
                    'Failed to purge {url}: {statusCode} {error}', [
                        'url'        => $url,
                        'error'      => $e->getMessage(),
                        'statusCode' => $e->getResponse()->getStatusCode() ]
                ),
                'imgix'
            );

            return false;
        }
    }
336913
public function match(string $uri): bool
    {
        if ($this->uri == $uri) {
            return true;
        }
        $pattern = '/^' . $this->regex . '$/';
        return !is_null($this->regex) && preg_match($pattern, $uri);
    }
484723
public function match(String $url, bool $strict, bool $case) {

		//If no strict routing, removing last / of $url if $this->path does not have it
		if(!$strict && $this->path[strlen($this->path) - 1] != '/')
			$url = rtrim($url, '/');

		if($case) 	$case = '';
		else 		$case = 'i';

		//Parameters name
		preg_match_all('/{([\w]+)}/', $this->path, $params);
		$params = $params['1'];

		//Replace default regex and brackets
		$path = preg_replace('/{([\w]+)}/', '([^/{}]+)', $this->path);
		$path = str_replace('\{', '{', $path);
		$path = str_replace('\}', '}', $path);

		//Add the regex if needed (regex array and params array not empty)
		$areRegex = !empty($this->regex) || !empty($params);
		if($areRegex) {
			//Explode the path
			$arrayPath = explode('([^/{}]+)', $path);
			$c = count($arrayPath);
			$path = '';

			//Between each '([^/{}]+)' add the path and the regex
			for($i = 0; $i<$c; $i++) {
				$path .= $arrayPath[$i];

				//The end of the path exploded is ""
				if($c-1 != $i) {
					if(isset($this->regex[$i]))
						$path .= $this->preg($this->regex[$i]);
					elseif(empty($this->regex))
						$path .= '([^/{}]+)';
					else
						$path .= $this->preg($this->regex[0]);
				}
			}
		}

		//Create global regex to match url
		$reg = "#^$path$#$case";

		if(!preg_match($reg, $url, $matches))
			return false;

		//Create an array with the parameters name and the value
		$slugs = array();
		if($areRegex) {
			array_shift($matches);
			$c = count($params);

			for($i = 0; $i<$c; $i++) {
				$slugs[$params[$i]] = $matches[$i];
			}
		}

		$this->slugs = $slugs;

		return true;

	}
294599
public function match($URL, $method='get'){
      $method = strtolower($method);

      // * is an http method wildcard
      if (empty($this->methods[$method]) && empty($this->methods['*'])) return false;

      return (bool) (
        $this->dynamic
           ? preg_match($this->matcher_pattern, '/'.trim($URL,'/'))
           : rtrim($URL,'/') == rtrim($this->pattern,'/')
      );
    }
1263443
private function matchUrl($url)
    {
        $request = Request::create($url);
        $this->requestAnalyzer->analyze($request);

        try {
            return null !== $this->router->matchRequest($request);
        } catch (ResourceNotFoundException $exception) {
            return false;
        }
    }
1076653
public function match($url, Page $page)
	{
		foreach ( $this->matchers as $page_url_matcher ) {
			$annotation_name = '@' . $page_url_matcher->getAnnotationName();
			$annotations = $this->annotationManager->getClassAnnotations($page, $annotation_name);

			if ( !$annotations ) {
				continue;
			}

			$this->ensureAnnotationsAreValid($annotations, $annotation_name);

			if ( $page_url_matcher->matches($url, $annotations) ) {
				return true;
			}
		}

		return false;
	}
227951
public function init(String $url = NULL) : CURL
    {
        if( $url !== NULL && ! IS::URL($url) )
        {
            $url = Request::getSiteURL($url);
        }

        $this->init = curl_init($url);

        return $this;
    }
310326
public function baseUrl($url = null)
    {
        if (!is_null($url) && true !== $url) {
            $this->baseUrl = $url;
            return $this;
        } elseif (!$this->baseUrl) {
            $str           = $this->url();
            $this->baseUrl = strpos($str, '?') ? strstr($str, '?', true) : $str;
        }
        return true === $url ? $this->domain() . $this->baseUrl : $this->baseUrl;
    }
631399
public static function parse($url)
    {
        if (!strlen($url)) {
            return null;
        }
        $_urls = array_merge( @parse_url($url), array('params'=>array()) );
        if (isset($_urls['query'])) {
            parse_str($_urls['query'], $_urls['params']);
        }
        return $_urls;  
    }
149163
public function match($url='')
    {
        if(strpos($url,'?')){
            list($url,$param)=explode('?',$url);
            parse_str($param,$_GET);
        }
        $host=get_domain();
        $route=Lists::get();
        foreach ($route as $item){
            if($item['domain']!='' && $item['domain']!=$host){
                continue;
            }
            if($item['method']!='any' && $item['method']!=$this->getMethod()){
                continue;
            }
            if($url==$item['pattern']){
                $this->run($item);
                exit;
            }elseif($this->is_rule($url,$item['pattern'])){
                $this->run($item);
                exit;
            }
        }
        $host=$this->get_server().$url;
        
        header('status: 404 Not Found');
        view()->miss($host);
    }
922341
public function match(string $url, array $filters = array()): bool{
		//Check filters
		foreach($filters as $key => $value){
			if(!isset($this->filters[$key]))
				return false;

			if(!in_array($value, $this->filters[$key]))
				return false;
		}
		
		//Check url
		$url = trim($url, '/');
		$path = preg_replace_callback('#:([\w]+)#', array($this, 'paramMatch'), $this->path);
		$regex = "#^$path$#i";
		if(!preg_match($regex, $url, $matches))
			return false;

		array_shift($matches);
		$this->matches = $matches;
		return true;
	}
1298867
public function url($url = null)
    {
        if (!is_null($url) && true !== $url) {
            $this->url = $url;
            return $this;
        } elseif (!$this->url) {
            if ($this->isCli()) {
                $this->url = isset($_SERVER['argv'][1]) ? $_SERVER['argv'][1] : '';
            } elseif (isset($_SERVER['HTTP_X_REWRITE_URL'])) {
                $this->url = $_SERVER['HTTP_X_REWRITE_URL'];
            } elseif (isset($_SERVER['REQUEST_URI'])) {
                $this->url = $_SERVER['REQUEST_URI'];
            } elseif (isset($_SERVER['ORIG_PATH_INFO'])) {
                $this->url = $_SERVER['ORIG_PATH_INFO'] . (!empty($_SERVER['QUERY_STRING']) ? '?' . $_SERVER['QUERY_STRING'] : '');
            } else {
                $this->url = '';
            }
        }
        return true === $url ? $this->domain() . $this->url : $this->url;
    }
721090
public function match($url)
    {
        foreach ($this->routes as $route => $params) {
            if (preg_match($route, $url, $matches)) {
                //Check if given method is matched
                if ($this->methodMatch($params['method'], null, new Request())) {
                    // Get named capture group values
                    foreach ($matches as $key => $match) {
                        if (is_string($key)) {
                            $params[$key] = $match;
                        }
                    }
                    $this->params = $params;

                    return true;
                }
            }
        }
    }
1253537
static public function clean_url($url=NULL) {
		//make sure we've still got something valid to work with.
		if(strlen($url)) {
			//if there's an "APPURL" constant, drop that from the url.
			if(defined('APPURL') && strlen(constant('APPURL'))) {
				$dropThis = preg_replace('/^\//', '', constant('APPURL'));
				$dropThis = preg_replace('/\//', '\\/', $dropThis);
				$url = preg_replace('/^'. $dropThis .'/', '', $url);
			}
			
			//check the string to make sure it doesn't begin with a "/"
			if($url[0] == '/') {
				$url = substr($url, 1, strlen($url));
			}
	
			//check the last char for a "/"...
			if($url[strlen($url) -1] == '/') {
				//last char is a '/'... kill it.
				$url = substr($url, 0, strlen($url) -1);
			}
	
			//if we've been sent a query, kill it off the string...
			if(preg_match('/\?/', $url)) {
				$url = preg_split('/\?/', $url);
				$url = $url[0];
			}
	
			if(preg_match("/\./", $url)) {
				//disregard file extensions, but keep everything else...
				//	i.e. "index.php/yermom.html" becomes "index/yermom"
				$tArr = explode('/', $url);
				$tUrl = null;
				foreach($tArr as $tUrlPart) {
					$temp = explode(".", $tUrlPart);
					if(strlen($temp[0])) {
						$tUrlPart = $temp[0];
					}
					$tUrl = ToolBox::create_list($tUrl, $tUrlPart, '/');
				}
				$url = $tUrl;
			}
		}
		else {
			$url = null;
		}

		return($url);
	}
47596
public function parseUrl($url, $config = []) {
		foreach ($this->_hosts as $stub) {
			$match = $this->_matchUrl($url, (array)$stub['url-match']);
			if (!$match) {
				continue;
			}

			$this->_match = $match;

			if (!empty($stub['fetch-match'])) {
				if (!$this->_parseLink($url, $stub['fetch-match'])) {
					return null;
				}
			}

			$stub['match'] = $this->_match;
			$Object = $this->object($stub, $config + $this->config);
			return $Object;
		}
	}
423704
public function match($uri = null, $method = null)
    {
        $context = $this->_context;

        $uri = $uri ?: $this->getRewriteUri();

        if ($method === null) {
            $method = $this->request->getServer('REQUEST_METHOD');
        }

        $context->controller = null;
        $context->action = null;
        $context->params = [];

        $context->matched = false;

        if ($this->_prefix) {
            if (strpos($uri, $this->_prefix) === 0) {
                $handledUri = substr($uri, strlen($this->_prefix)) ?: '/';
            } else {
                $handledUri = false;
            }
        } else {
            $handledUri = $uri;
        }

        $area = null;
        $routes = $this->_simple_routes;
        if ($handledUri === false) {
            $parts = false;
        } elseif (isset($routes[$method][$handledUri])) {
            $parts = $routes[$method][$handledUri]->match($handledUri, $method);
        } elseif (isset($routes[''][$handledUri])) {
            $parts = $routes[''][$handledUri]->match($handledUri, $method);
        } else {
            $parts = false;
            $routes = $this->_regex_routes;
            for ($i = count($routes) - 1; $i >= 0; $i--) {
                $route = $routes[$i];
                if (($parts = $route->match($handledUri, $method)) !== false) {
                    if ($handledUri !== '/' && $this->_areas) {
                        if (($pos = strpos($handledUri, '/', 1)) === false) {
                            $area = Text::camelize(substr($handledUri, 1));
                        } else {
                            $area = Text::camelize(substr($handledUri, 1, $pos - 1));
                        }

                        if (!in_array($area, $this->_areas, true)) {
                            $area = null;
                        }
                    }
                    break;
                }
            }

            if ($parts === false) {
                if ($handledUri !== '/' && $this->_areas) {
                    if (($pos = strpos($handledUri, '/', 1)) !== false) {
                        $area = Text::camelize(substr($handledUri, 1, $pos - 1));
                        if (in_array($area, $this->_areas, true)) {
                            $handledUri = substr($handledUri, $pos);
                        } else {
                            $area = null;
                        }
                    } else {
                        $area = Text::camelize(substr($handledUri, 1));
                        if (in_array($area, $this->_areas, true)) {
                            $handledUri = '/';
                        } else {
                            $area = null;
                        }
                    }
                }

                $handledUri = $handledUri === '/' ? '/' : rtrim($handledUri, '/');
                $parts = $this->_default_route->match($handledUri, $method);
            }
        }

        if ($parts === false) {
            return false;
        }

        $context->matched = true;

        if ($area) {
            $context->area = $area;
        } elseif (isset($parts['area'])) {
            $context->area = $parts['area'];
        }

        $context->controller = $parts['controller'];
        $context->action = $parts['action'];
        $context->params = isset($parts['params']) ? $parts['params'] : [];

        return $context;
    }