SessionHelper Class Reference

Public Member Functions | |
| activate ($base=null) | |
| check ($name) | |
| error () | |
| flash ($key= 'flash') | |
| id () | |
| read ($name=null) | |
| valid () | |
| write () | |
Public Attributes | |
| $helpers = null | |
Detailed Description
Definition at line 42 of file session.php.
Member Function Documentation
| SessionHelper::activate | ( | $ | base = null |
) |
Turn sessions on if 'Session.start' is set to false in core.php
- Parameters:
-
string $base
Definition at line 72 of file session.php.
| SessionHelper::check | ( | $ | name | ) |
Used to check is a session key has been set
In your view: $session->check('Controller.sessKey');
- Parameters:
-
string $name
- Returns:
- boolean public
Reimplemented from CakeSession.
Definition at line 101 of file session.php.
| SessionHelper::error | ( | ) |
Returns last error encountered in a session
In your view: $session->error();
- Returns:
- string last error public
Reimplemented from CakeSession.
Definition at line 115 of file session.php.
| SessionHelper::flash | ( | $ | key = 'flash' |
) |
Used to render the message set in Controller::Session::setFlash()
In your view: $session->flash('somekey'); Will default to flash if no param is passed
- Parameters:
-
string $key The [Message.]key you are rendering in the view.
- Returns:
- string Will echo the value if $key is set, or false if not set. public
Definition at line 131 of file session.php.
References $out, ClassRegistry::getObject(), and params().
| SessionHelper::id | ( | ) |
| SessionHelper::read | ( | $ | name = null |
) |
Used to read a session values set in a controller for a key or return values for all keys.
In your view: $session->read('Controller.sessKey'); Calling the method without a param will return all session vars
- Parameters:
-
string $name the name of the session key you want to read
- Returns:
- values from the session vars public
Reimplemented from CakeSession.
Definition at line 86 of file session.php.
| SessionHelper::valid | ( | ) |
Used to check is a session is valid in a view
- Returns:
- boolean public
Reimplemented from CakeSession.
Definition at line 165 of file session.php.
| SessionHelper::write | ( | ) |
Override CakeSession::write(). This method should not be used in a view
- Returns:
- boolean public
Definition at line 177 of file session.php.
References a().
Member Data Documentation
| SessionHelper::$helpers = null |
Definition at line 48 of file session.php.
The documentation for this class was generated from the following file:
- 1.2.x.x/cake/libs/view/helpers/session.php