update cookie method to latest api

This commit is contained in:
Qingping Hou
2013-03-16 16:27:26 -04:00
parent e0854b965c
commit f5e98c033e

View File

@@ -61,11 +61,12 @@ An instance of the API is passed via :doc:`../general/dependencyinjection`, the
.. note:: If an URL Parameter, POST or GET value exist with the same key, the URL Parameter is preferred over the POST parameter and the POST parameter is preferred over the GET parameter. You should avoid this scenario though.
If you want to access env variables, use **$this->env($key)**. Session and
cookie variables can be manipulated via **session** and **cookie** methods. For
example, to get a value of variable from session:
**$this->session($key_name)**. To set a variable in cookie:
**$this->cookie($key_name, $value_name)**.
If you want to access environment variables($_ENV), use **$this->env($key)**.
Session and cookie variables can be accessed via **session** and **cookie**
methods. For example, to get a value of a variable from session:
**$this->cookie($key_name)**. Not like cookie, which is read only, session
variables can also be changed using: **$this->session($key_name,
$value_name)**.
Every controller method has to return a Response object. The currently available Responses from the App Framework include: