获取当前的 response 输出类型
@access public
@param $action string 方法 ['view', 'json', 'console', 'xml', 'jsonp']
@return string|boolean
339712
public function getReturnType($action)
    {
        if(isset($this->returnType[$action])){

            return $this->returnType[$action];
        }

        return false;
    }
98533
public static function isPublicAction($public_action = [])
    {
        // 当前操作
        $current_action = strtolower(Common::getCurrentAction());
        
        // 公开操作
        $public_action_patern = '#(^' . implode(')|(^', $public_action) . ')#i';
        
        return preg_match($public_action_patern, $current_action);
    }
877543
public function action(String $action = NULL)
    {
        $time = $this->redirect['time'];
        $data = $this->redirect['data'];

        $this->redirect = [];

        if( strstr(get_called_class() , 'Refresh') )
        {
            $exit = false;
            $type = 'refresh';
        }
        
        $this->location($action, $time, $data, $exit ?? true, $type ?? 'location');
    }
1023688
public function url($long_url, $action = 'long2short')
    {
        if (!is_string($long_url)) {
            $this->setError('参数错误');

            return false;
        }

        $queryStr = [
            "action"   => $action,
            "long_url" => $long_url,
        ];

        $this->module = 'shorturl';

        $res = $this->_post('', $queryStr);

        return $res;
    }
579758
public function action($action = null)
    {
        if (!is_null($action)) {
            $this->action = $action;
            return $this;
        } else {
            return $this->action ?: '';
        }
    }
1160156
protected function formatAction($action)
    {
        if ($this->rootNamespace && ! (strpos($action, '\\') === 0)) {
            return $this->rootNamespace.'\\'.$action;
        } else {
            return trim($action, '\\');
        }
    }
93218
public function getByAction($action)
	{
		return isset($this->actionList[$action]) ? $this->actionList[$action] : null;
	}
1065220
protected function getActionUrl($action) : string
    {
        $context = Context::getInstance();
        return $context->getUrl($context->getParameter('controller_path') . $action);
    }
324256
final public function render($action)
    {
        // Initialize view object if auto render is enable
        if (Configuration::read('mvc.view.auto_render') === true) {
            $this->setView($this->controller, $action);
        }
        // Initialize layout object if auto render is enable
        if (Configuration::read('mvc.layout.auto_render') === true) {
            // Get Layout default name from Configuration
            $layoutName = Configuration::read('mvc.layout.default');
            $this->setLayout($layoutName);
        }
        // Call initialize method in Controller if exists
        if (method_exists($this, 'initialize')) {
            $this->initialize();
        }
        // Launch action of controller
        ob_start();
        $actionResult = $this->$action();
        echo PHP_EOL;
        $bodyContent = ob_get_clean();
        // If Controller's Action return false, disable Layout and View
        if ($actionResult !== false) {
            if (isset($this->layout) && $this->layout->getAutoRender()) {
                // Get Layout and View if auto render of View enable
                $bodyContent .= $this->layout->render();
            } elseif (isset($this->view) && $this->view->getAutoRender()) {
                // Get View only
                $bodyContent .= $this->view->render();
            }
        }
        return $bodyContent;
    }
651909
public function render($action = null)
    {
        $action = is_null($action) ? $this->controller->action : $action;
        if (strpos($action, '/') === false) {
            $view_filename = VIEWS_DIR . $this->controller->name . '/' . $action . static::$ext;
        } else {
            $view_filename = VIEWS_DIR . $action . static::$ext;
        }
        $content = static::extract($view_filename, $this->vars);
        $this->controller->output .= $content;
    }
560692
public function actionClass(string $action): string
    {
        switch ($action) {
            case ModelHistory::ACTION_CREATE:
                $class = 'success';
                break;
            case ModelHistory::ACTION_DELETE:
                $class = 'danger';
                break;
            case ModelHistory::ACTION_COMMENT:
                $class = 'active';
                break;
            case ModelHistory::ACTION_UPDATE:
            default:
                $class = 'info';
                break;
        }

        return $class;
    }
1219920
protected function parseAction($action)
    {
        if (\is_string($action)) {
            return ['uses' => $action];
        } elseif (! \is_array($action)) {
            return [$action];
        }

        if (isset($action['middleware']) && \is_string($action['middleware'])) {
            $action['middleware'] = \explode('|', $action['middleware']);
        }

        return $action;
    }
1138401
public function uses($action)
    {
        $action = is_string($action) ? $this->addGroupNamespaceToStringUses($action) : $action;

        return $this->setAction(array_merge($this->action, $this->parseAction([
            'uses' => $action,
            'controller' => $action,
        ])));
    }
306687
private function describeActions($action = "") {

		if (!empty($action)) {
			$parts = explode('_', $action);
			unset($parts[0]);
			$parts = array_values($parts);

			$act = new \stdClass();

			$act->method = $action;

			switch (count($parts)) {
			case 1:
			case 2:
			case 3:
				$act->name = $parts[0];
			case 2:
			case 3:
				$act->tag = $parts[1];
			case 3:
				$act->priority = intval($parts[2]);
				break;
			}
			if (count($parts) == 1) {
				$act->tag = 'initi';
				$act->priority = 10;
			}

			return $act;

		}
		return null;
	}
1291449
public function log($action, array $data)
    {
        $curUser = wei()->curUser;
        $app = wei()->app;

        if (isset($data['param']) && is_array($data['param'])) {
            $data['param'] = json_encode($data['param'], JSON_UNESCAPED_UNICODE);
        }

        if (isset($data['ret']) && is_array($data['ret'])) {
            $data['ret'] = json_encode($data['ret'], JSON_UNESCAPED_UNICODE);
        }

        wei()->appDb->insert('userLogs', $data + [
                'appId' => $app->getId(),
                'userId' => (int) $curUser['id'],
                'nickName' => $curUser->getNickName(),
                'page' => $app->getControllerAction(),
                'action' => $action,
                'createTime' => date('Y-m-d H:i:s'),
            ]);

        return $this;
    }
460841
protected function normalizeAction(string $action): string
    {
        $action = strtolower($action);
        $action = str_replace(['_', '-', '.'], ' ', $action);
        $action = ucwords($action);
        $action = str_replace(' ', '', $action);
        $action = lcfirst($action);

        return $action;
    }
122601
public function update(string $action)
    {
        $action = mb_strtolower($action);

        if (! in_array($action, ['enable', 'disable'])) {
            return $this->respondsWithError(trans('globals.action_not_allowed'));
        }

        Auth::user()->$action();

    	return $this->respondsWithSuccess(trans('user.success'));
    }