public function updateActionPost() : object
    {
        $response = $this->di->get("response");
        $request = $this->di->get("request");
        $session = $this->di->get("session");
        $key = $request->getPost("stylechooser");

        if ($key === "none") {
            $session->set("flashmessage", "Unsetting the style and using deafult style.");
            $session->set(self::$key, null);
        } elseif (array_key_exists($key, $this->styles)) {
            $session->set("flashmessage", "Using the style '$key'.");
            $session->set(self::$key, $key);
        }

        return $response->redirect("style");
    }
public function updateActionPost() : object
    {
        $response = $this->di->get("response");
        $request = $this->di->get("request");
        $session = $this->di->get("session");
        $key = $request->getPost("stylechooser");

        if ($key === "none") {
            $session->set("flashmessage", "Unsetting the style and using deafult style.");
            $session->set(self::$key, null);
        } elseif (array_key_exists($key, $this->styles)) {
            $session->set("flashmessage", "Using the style '$key'.");
            $session->set(self::$key, $key);
        }

        return $response->redirect("style");
    }
public function updateActionPost ( ) : object { $ response = $ this -> di -> get ( "response" ) ; $ request = $ this -> di -> get ( "request" ) ; $ session = $ this -> di -> get ( "session" ) ; $ key = $ request -> getPost ( "stylechooser" ) ; if ( $ key === "none" ) { $ session -> set ( "flashmessage" , "Unsetting the style and using deafult style." ) ; $ session -> set ( self :: $ key , null ) ; } elseif ( array_key_exists ( $ key , $ this -> styles ) ) { $ session -> set ( "flashmessage" , "Using the style '$key'." ) ; $ session -> set ( self :: $ key , $ key ) ; } return $ response -> redirect ( "style" ) ; }
Update current selected style.

@return object
Update current selected style .