blink\core\Application::createAction PHP Method

createAction() protected method

protected createAction ( $handler )
    protected function createAction($handler)
    {
        if ($handler instanceof Closure) {
            $action = $handler;
        } else {
            if (($pos = strpos($handler, '@')) !== false) {
                $class = substr($handler, 0, $pos);
                $method = substr($handler, $pos + 1);
                if ($class[0] !== '\\' && $this->controllerNamespace) {
                    $class = $this->controllerNamespace . '\\' . $class;
                }
                $action = [$this->get($class), $method];
            } else {
                throw new HttpException(404);
            }
        }
        return $action;
    }