Cockpit\Controller::__construct PHP Метод

__construct() публичный Метод

public __construct ( $app )
    public function __construct($app)
    {
        $user = $app->module("auth")->getUser();
        if (!$user) {
            $app->reroute('/auth/login');
            $app->stop();
        }
        parent::__construct($app);
        $this->user = $app["user"] = $user;
        $this->db = $app->db;
        $this->memory = $app->memory;
        $controller = strtolower(str_replace('\\', '.', get_class($this)));
        $app->trigger("app.{$controller}.init", [$this]);
    }
Controller