Determine if it is to export (download) file
@param  string  $resource Resource name
@param  string  $action   Action name
@return boolean
184060
public function isExportFileAction($resource, $action)
    {
        return isset($this->exportFileActions[$resource]) && in_array($action, $this->exportFileActions[$resource]);
    }
865903
private function isLoginPage(Action $action): bool
    {
        $loginUrl = trim(Url::to(Yii::$app->user->loginUrl), '/');

        if (Yii::$app->user->isGuest && $action->getUniqueId() === $loginUrl) {
            return true;
        }

        return false;
    }
1237287
public static function isMethod($action) {
        switch (strtoupper($action)) {
        case 'GET':
            return $_SERVER['REQUEST_METHOD'] == 'GET';
        case 'POST':
            return $_SERVER['REQUEST_METHOD'] == 'POST';
        case 'DELETE':
            return $_SERVER['REQUEST_METHOD'] == 'DELETE'
            ?: (isset($_POST['_method']) && $_POST['_method'] == 'DELETE');
        case 'PUT':
            return $_SERVER['REQUEST_METHOD'] == 'PUT'
            ?: (isset($_POST['_method']) && $_POST['_method'] == 'PUT');
        case 'AJAX':
            return static::isAjax();
        case 'wechat':
            return static::isWeChat();
        case 'mobile':
            return static::isMobile();
        }
    }
422553
public function applyScope($resource, $action = null)
    {
        $request = $this->getController()->request;
        if ($action === null) {
            $action = $this->getDefaultAction($request);
        }
        $identity = $this->getIdentity($request);

        return $identity->applyScope($action, $resource);
    }
1131962
public function isGranted(string $action): bool
    {
        if (empty($this->allowed)) {
            return false;
        }

        if (isset($this->denied[$action]) || isset($this->denied[self::WILDCARD])) {
            return false;
        }

        $rules = $this->getRules($action);

        foreach ($rules as $rule) {
            if (isset($this->denied[$rule])) {
                return false;
            }
        }

        foreach ($rules as $rule) {
            if (isset($this->allowed[$rule])) {
                return true;
            }
        }

        return false;
    }
331071
protected function isSupported($action)
    {
        if (empty($this->endpointsSupported) || in_array($action, $this->endpointsSupported)) {
            return true;
        }

        return $this->actionNotSupported($action);
    }
495832
public function isAction($action)
    {
        $isAction = parent::isAction($action);
        if ($isAction) {
            return true;
        }

        if ($this->_isActionMapped()) {
            return true;
        }

        return false;
    }
806263
protected function check($action)
	{
		$this->log('check', LOG_DEBUG);

		if (is_array($this->remote_host))
		{
			foreach ($this->remote_host as $key => $remote_host)
			{
				if ($key == 0) continue;

				$this->prepareRemoteDirectory($remote_host, $this->remote_dir);
			}
		}

		if ($action == 'update')
			$this->checkFiles(is_array($this->remote_host) ? $this->remote_host[0] : $this->remote_host, $this->remote_dir, $this->last_remote_target_dir);

		if ($action == 'update')
		{
			if (is_array($this->remote_host))
			{
				foreach ($this->remote_host as $remote_host)
				{
					if ($files = $this->listFilesToRename($remote_host, $this->remote_dir))
					{
						$this->log("Target-specific file renames on $remote_host:");

						foreach ($files as $filepath => $newpath)
							$this->log("  $newpath => $filepath");
					}
				}
			}
			else
			{
				if ($files = $this->listFilesToRename($this->remote_host, $this->remote_dir))
				{
					$this->log('Target-specific file renames:');

					foreach ($files as $filepath => $newpath)
						$this->log("  $newpath => $filepath");
				}
			}
		}

		// als alles goed is gegaan kan er doorgegaan worden met de deployment
		if ($action == 'update')
			return static::inputPrompt('Proceed with deployment? (yes/no): ', 'no') == 'yes';
		elseif ($action == 'rollback')
			return static::inputPrompt('Proceed with rollback? (yes/no): ', 'no') == 'yes';

        return false;
	}
1057918
public function setAction($action)
    {
        $result           = false;
        $actionsAvailable = $this->getActionsInfo();
        if (is_array($actionsAvailable) && array_key_exists($action,
                $actionsAvailable)) {
            $this->action = $action;
            $result       = true;
        }
        return $result;
    }
284796
@Override
    public boolean validateAction(String action) {
        boolean result = false;
        if (action.equals(MessagingSecurityConstants.OPERATION_TYPE_SEND) ||
            action.equals(MessagingSecurityConstants.OPERATION_TYPE_RECEIVE)) {
            result = true;
        }
        return result;
    }
419958
public function getActionsByResource($resource)
    {
        if (!isset($this->resources[$resource])) {
            return null; // no resource found
        }

        $actions = array();
        foreach ($this->resources[$resource] as $action => $path) {
            $actions[] = $action;
        }

        return $actions;
    }
638338
public function getRouteName($resourceName = null, $action)
    {
        $resourceName = $resourceName ?? $this->resourceName;
        return $this->alias.$resourceName.'.'.$action;
    }
126271
public function action($action)
    {
        $a = func_get_args();
        $controllerPath = $this->controller->getControllerActionPath();
        array_unshift($a, $controllerPath);
        $ret = call_user_func_array([$this, 'url'], $a);

        return $ret;
    }
435731
public function loadFromCache($controller, $action){

		$this->saveInputParams(array('controller' => $controller, 'action' => $action));

		if(!$this->needCache()){
			return false;
		}

		$path = Yii::getAlias('@webroot') . $this->getFilePath();

		if(!file_exists($path)){
			return false;
		}

		$lastModified = filemtime($path);

		// File exists but it older than lifetime of cache
		if(time() - $lastModified > $this->lifeTime){
			return false;
		}

		$this->directReplace('CSRF_TOKEN', Yii::$app->request->getCsrfToken());

		$output = file_get_contents($path);

		$replaced = $this->makeReplace($output);


		echo $replaced;
		echo '<!--GENERATED WITH YII HTML CACHE-->';
		die;
	}
277822
public function checkMethod($action): bool {
        $methods = $this->methods();
        return !isset($methods[$action]) ||
            in_array(app('request')->method(), $methods[$action]);
    }
925688
public function canSubresourceCached($subresource, $action) : bool {
		if (!isset($this->cached_can_subresource_requests[$subresource][$action])) {
			$this->cached_can_subresource_requests[$subresource][$action] = $this->canSubresource($subresource, $action);
		}
		return $this->cached_can_subresource_requests[$subresource][$action];
	}
119595
public function isMultiPartAction($resource, $action)
    {
        return isset($this->multiPartActions[$resource]) && in_array($action, $this->multiPartActions[$resource]);
    }