read('Controller.sessKey');` * Calling the method without a param will return all session vars * * @param string $name the name of the session key you want to read * @return values from the session vars * @link http://book.cakephp.org/view/1466/Methods */ public function read($name = null) { return CakeSession::read($name); } /** * Used to check is a session key has been set * * In your view: `$session->check('Controller.sessKey');` * * @param string $name * @return boolean * @link http://book.cakephp.org/view/1466/Methods */ public function check($name) { return CakeSession::check($name); } /** * Returns last error encountered in a session * * In your view: `$session->error();` * * @return string last error * @link http://book.cakephp.org/view/1466/Methods */ public function error() { return CakeSession::error(); } /** * 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 * * @param string $key The [Message.]key you are rendering in the view. * @return boolean|string Will return the value if $key is set, or false if not set. * @access public * @link http://book.cakephp.org/view/1466/Methods * @link http://book.cakephp.org/view/1467/flash */ public function flash($key = 'flash') { $out = false; if (CakeSession::check('Message.' . $key)) { $flash = CakeSession::read('Message.' . $key); if ($flash['element'] == 'default') { if (!empty($flash['params']['class'])) { $class = $flash['params']['class']; } else { $class = 'message'; } $out = '