is exists targeted action ?

@param   Samurai\Samurai\Component\Routing\Rule\Rule
@return  boolean
347094
public function isActionExists(Rule\Rule $rule)
    {
        return $this->actionChain->existsController($rule->getController(), $rule->getAction());
    }
242188
private function checkHostRule($rule)
    {
        if (!isset($this->url)) {
            $error_msg = 'Inline host directive detected. URL not set, result may be inaccurate.';
            $this->log[] = $error_msg;
            trigger_error("robots.txt: $error_msg", E_USER_NOTICE);
            return false;
        }
        $url = $this->parseURL($this->url);
        $host = trim(str_ireplace(self::DIRECTIVE_HOST . ':', '', mb_strtolower($rule)));
        if (in_array(
            $host, array(
                $url['host'],
                $url['host'] . ':' . $url['port'],
                $url['scheme'] . '://' . $url['host'],
                $url['scheme'] . '://' . $url['host'] . ':' . $url['port']
            )
        )) {
            $this->log[] = 'Rule match: ' . self::DIRECTIVE_HOST . ' directive';
            return true;
        }
        return false;
    }
1080002
public function checkRules($rules, Array $params = null)
    {
        if (is_string($rules)) {
            $rules = (array)explode(',', $rules);
        }

        foreach ($rules as $name) {
            if (!$this->hasRule($name) || !$this->getRule($name)->execute($this, $params)) {
                return false;
            }
        }

        return true;
    }
1132110
final public function exists($path)
    {
        return $this->getRepositoryContent()->exists(
            $this->settings->getVendor(),
            $this->settings->getPackage(),
            $path,
            $this->settings->getReference()
        );
    }
1337319
public function canViewTarget()
    {
        $action = $this->CurrentAction();
        if ($action) {
            return $action->canViewTarget($this->getTarget());
        }
        return true;
    }
277043
private function checkBasicRule($rule, $path)
    {
        $rule = $this->prepareRegexRule($this->encode_url($rule));
        // change @ to \@
        $escaped = strtr($rule, array('@' => '\@'));
        // match result
        if (preg_match('@' . $escaped . '@', $path)) {
	        $this->log[] = 'Rule match: Path';
	        return true;
        }
        return false;
    }
211168
protected static function _execute($rule) {
		if (!isset($rule[2])) {
			$rule[2] = true;
		}

		if (!isset($rule[1])) {
			$rule[1] = array();
		}

		list($callback, $args, $successOn) = $rule;

		if (!is_callable($callback)) {
			if (is_array($callback)) {
				$callback = implode('::', $callback);
			}
			throw new CommonRevealException(__d('common', "Callback '%s()' is not defined.", $callback));
		}

		if (!is_array($args)) {
			$args = array($args);
		}

		if (count($args)) {
			$result = call_user_func_array($callback, $args);
		} else {
			$result = call_user_func($callback);
		}

		if (is_array($successOn)) {
			return in_array($result, $successOn);
		} else {
			return $result == $successOn;
		}
	}
2613
protected function translateExists()
    {
        $translator = new static;

        // translate the subselect
        list($subQuery, $subQueryParameters) = $translator->translate($this->attr('select'));

        // merge the parameters
        foreach($subQueryParameters as $parameter)
        {
            $this->addParameter($parameter);
        }

        return 'select exists(' . $subQuery .') as `exists`';
    }
1332196
public function check($name){
		if ($this->local){
			/*!
			todo
				add referrer check, to prevent access from remote points
			*/
		}
		if (!isset($this->rules[$name]) || !$this->rules[$name]){
			return false;
		}
		return true;
	}
998090
public function hasAction($action)
    {
        if ($action == 'index') {
            return true;
        }

        // Don't allow access to any non-public methods (inspect instance plus all extensions)
        $insts = array_merge([$this], (array) $this->getExtensionInstances());
        foreach ($insts as $inst) {
            if (!method_exists($inst, $action)) {
                continue;
            }
            $r = new ReflectionClass(get_class($inst));
            $m = $r->getMethod($action);
            if (!$m || !$m->isPublic()) {
                return false;
            }
        }

        $action  = strtolower($action);
        $actions = $this->allowedActions();

        // Check if the action is defined in the allowed actions of any ancestry class
        // as either a key or value. Note that if the action is numeric, then keys are not
        // searched for actions to prevent actual array keys being recognised as actions.
        if (is_array($actions)) {
            $isKey   = !is_numeric($action) && array_key_exists($action, $actions);
            $isValue = in_array($action, $actions, true);
            if ($isKey || $isValue) {
                return true;
            }
        }

        $actionsWithoutExtra = $this->config()->get('allowed_actions', true);
        if (!is_array($actions) || !$actionsWithoutExtra) {
            if (!in_array(strtolower($action), ['run', 'doinit']) && method_exists($this, $action)) {
                return true;
            }
        }

        return false;
    }
267851
private function isRule($rule) {

		if(false === is_string($rule)) {
			return false;
		}

		$class = $this -> getRuleClass($rule);

		return true === class_exists($class);
	}
1138854
public function exists()
	{
		$sql = $this->grammar->compileExists( $this );

		$results = $this->connection->select( $sql, $this->getBindings(), !$this->useWritePdo );

		if ( isset( $results[0] ) )
		{
			$results = (array) $results[0];

			return (bool) $results['exists'];
		}

		return false;
	}
644654
public function routing()
    {
        // has dispatch.
        if ($action = $this->getDispatchAction()) {
            return new Rule\MatchRule(array('action' => $action));
        }

        // default rule.
        $path = '/';
        if ($this->_default && $this->_default->matching($path)) {
            return $this->_default;
        }
    }
604513
public function hasAction(int $actionValue): bool
    {
        $count = $this
            ->filter(function (Action $action) use ($actionValue) {
                return $action->action() === $actionValue;
            })
            ->count();

        return $count > 0 ? true : false;
    }
678052
public function existsController($name, $action = null)
    {
        $names = explode('_', $name);
        array_unshift($names, 'Controller');
        $base = join(DS, array_map('ucfirst', $names)) . 'Controller.php';

        $file = $this->loader->findFirst($base);
        if ($file) {
            $class = $file->getClassName();
            if (! $action && class_exists($class)) return true;
            
            $action = $this->actionNameStrategy($action);
            if (method_exists($class, $action)) return true;
        }

        return false;
    }
171733
private function validateRule($rule): bool
    {
        if ($rule instanceof \Closure || $rule instanceof RuleInterface) {
            return true;
        }

        if (is_array($rule)) {
            return is_callable($rule, true);
        }

        if (is_string($rule) && class_exists($rule)) {
            try {
                $reflection = new \ReflectionClass($rule);
            } catch (\ReflectionException $e) {
                return false;
            }

            return $reflection->isSubclassOf(RuleInterface::class);
        }

        return false;
    }
905932
public function actionExists($id)
    {
        $inlineActionMethodName = 'action' . Inflector::camelize($id);
        if (method_exists($this->controller, $inlineActionMethodName)) {
            return true;
        }
        if (array_key_exists($id, $this->controller->actions())) {
            return true;
        }
        return false;
    }