Returns a MatchedRule instance of the matched cache rule.

@return bool|MatchedRule MatchedRule instance. or false if no cache rule matched the request.
554220
public function getMatchedRule($cacheRule = null)
    {
        $request = $this->getRequest();

        if (!empty($cacheRule)) {
            if (isset($this->cacheRules[$cacheRule])) {
                $cr = $this->cacheRules[$cacheRule];
                $cacheKey = $cr->match($request);

                return new MatchedRule(clone $cr, $cacheKey);
            }
        } else {
            foreach ($this->cacheRules as $cr) {
                if (($cacheKey = $cr->match($request))) {
                    return new MatchedRule(clone $cr, $cacheKey);
                }
            }
        }


        return false;
    }
308830
protected function buildRules()
    {
        if ($this->rules) {
            return $this->rules;
        }

        if ($resource = $this->resource()) {
            $this->rules = $this->filterDetectedRules($this->detectRules($resource), $resource);
        }

        return $this->rules;
    }
838452
public function getSearchRules()
    {
        return isset($this->searchRules) && count($this->searchRules) > 0 ?
            $this->searchRules : [SearchRule::class];
    }
1175039
protected function getRules()
    {
        if ($this->compiledRules === null) {
            $rules = array();
            foreach ($this->ruleFiles as $file) {
                $rules = array_merge(
                    $rules,
                    $this->parser->parse($file)
                );
            }

            $this->compiledRules = $this->compiler->compile($rules);
        }

        return $this->compiledRules;
    }
1094508
public function getMatcher()
    {
        if (null === $this->matcher) {
            $this->setMatcher($this->getRouterContainer()->getMatcher());
        }
        return $this->matcher;
    }
922271
public function getReduceRule(): ?Rule
    {
        foreach ($this->items as $item) {
            if (!$item->hasFurther()) {
                return $item->getAsRule();
            }
        }
        return null;
    }
225683
public function getEntityRules()
    {
        $cache = $this->getCache();
        if ($cache) {
            $this->entityLocalRules = $cache->get($this->getEntityRulesCacheKey());
        }
        if (empty($this->entityLocalRules) || !is_array($this->entityLocalRules)) {
            $rules = array_merge($this->getGuidRules(), $this->getIdRules(), $this->getCreatedAtRules(), $this->getUpdatedAtRules(), $this->getExpiredAfterRules(), $this->getIpRules());
            $this->setEntityRules($rules);
        }
        return $this->entityLocalRules;
    }
699965
public function evaluateRules()
    {
        foreach ($this->rules as $rule => $condition) {
            $this->rules[$rule] = $this->conditions->is($rule, $condition);
        }

        return $this->rules;
    }
314134
private function checkSubSpec()
    {
        $validation = $this->cache->validation($this->currentSubSpec);
        if (!is_null($validation)) {
            return $validation;
        }

        return $this->validateSubSpec();
    }
543232
protected function getMatchedSiteAccess()
    {
        if (isset($this->matchedSiteAccess)) {
            return $this->matchedSiteAccess;
        }

        preg_match(
            "@{$this->regex}@",
            $this->element,
            $match
        );

        $this->matchedSiteAccess = isset($match[$this->itemNumber]) ? $match[$this->itemNumber] : false;

        return $this->matchedSiteAccess;
    }
449080
public function getCachedConfigPath()
    {
        if ($this->initialized && env('CACHE_CONFIG_FILE')) {
            $this->cacheFile($this->basePath.'/bootstrap/cache/config.php', $this->configPath);
            return $this->configPath;
        }

        return false;
    }
302947
protected function getRules()
    {
        if ($this->rules instanceof \Closure) {
            return $this->rules->call($this, $this->form);
        }

        return $this->rules;
    }
282509
private function matchExact(): bool
    {
        foreach ($this->routesExact as $route) {
            if ($this->uri === $route['u']) { // compare the current URI array to this route URI array
                $this->control = $route['c']; // set control or this exact match

                return true; // exact match found
            }
        }

        return false; // exact match not found
    }
398954
public function getCacheRule($name = null)
    {
        if (is_null($name)) {
            return $this->cacheRules;
        } else {
            foreach ($this->cacheRules as $r) {
                if ($r->getName() == $name) {
                    return $r;
                }
            }

            return false;
        }
    }
1133732
public function equals(Rule $rule)
    {
        if ($this->ruleHash !== $rule->ruleHash) {
            return false;
        }

        if (count($this->literals) != count($rule->literals)) {
            return false;
        }

        for ($i = 0, $n = count($this->literals); $i < $n; $i++) {
            if ($this->literals[$i] !== $rule->literals[$i]) {
                return false;
            }
        }

        return true;
    }
915888
protected function getRules()
    {
        if ($this->compiledRules === null) {
            $rules = array();

            foreach ($this->ruleFiles as $file) {
                $rules += require $file;
            }

            $this->compiledRules = $this->compiler->compile($rules);
        }

        return $this->compiledRules;
    }
234619
public function getRule()
    {
        $returnValue = (string) '';

        
        $returnValue = 'if(isNull(null, getResponse("'.$this->getResponse()->getIdentifier().'"))) { '.
        	'setOutcomeValue("'.$this->getOutcome()->getIdentifier().'", 0); } else { '.
        	'setOutcomeValue("'.$this->getOutcome()->getIdentifier().'", '.
        		'mapResponse(null, getMap("'.$this->getResponse()->getIdentifier().'"), getResponse("'.$this->getResponse()->getIdentifier().'"))); };';
        

        return (string) $returnValue;
    }