Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthorThijs
     

    Simple question: How do I get and set cookies in Akelos?

    The only reference I can find in the API docs is getCookies() , but how to use it?

    • CommentAuthorThijs
     

    Not knowing of another way I've set them using the regular PHP function

    setcookie("name",$value,time()+(3600*8760),"/",AK_COOKIE_DOMAIN);
    

    and that seems to work (why shouldn't it)

    And existing cookies or not in $this->cookies['name'] or something as I thought they would be
    (also because session values are in $this->session['name']), but in:

    $this->params['name'];
    

    But.. cookie values overrule any parameters with the same name.

    •  
      CommentAuthorbermi
     

    There is no simpler way to manipulate cookies on PHP than using

    $_COOKIE
    

    just like you would use $_SESSION

    BTW, params are set in this priority.

    $_GET < $_POST < $_FILES < $_COOKIE < $_SESSION
    

    From simpler to harder to fake :)