SessionHelper Class Reference

List of all members.

Public Member Functions

 __construct ($base=null)
 __start ()
 activate ($base=null)
 check ($name)
 error ()
 flash ($key= 'flash')
 id ()
 read ($name=null)
 valid ()
 write ()

Public Attributes

 $__active = true
 $helpers = null

Detailed Description

Definition at line 40 of file session.php.


Constructor & Destructor Documentation

SessionHelper::__construct ( base = null  ) 

Class constructor

Parameters:
string $base

Definition at line 58 of file session.php.

References __construct(), and Configure::read().


Member Function Documentation

SessionHelper::__start (  ) 

Determine if Session has been started and attempt to start it if not

Returns:
boolean true if Session is already started, false if Session could not be started public

Definition at line 195 of file session.php.

References start(), and started().

Referenced by check(), error(), flash(), read(), and valid().

SessionHelper::activate ( base = null  ) 

Turn sessions on if 'Session.start' is set to false in core.php

Parameters:
string $base

Definition at line 70 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

Definition at line 99 of file session.php.

References __start(), and check().

SessionHelper::error (  ) 

Returns last error encountered in a session

In your view: $session->error();

Returns:
string last error public

Definition at line 113 of file session.php.

References __start(), and error().

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 129 of file session.php.

References $out, __start(), check(), del(), ClassRegistry::getObject(), params(), and read().

SessionHelper::id (  ) 

Session id

Returns:
string Session id public

Definition at line 184 of file session.php.

References 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

Definition at line 84 of file session.php.

References __start(), and read().

SessionHelper::valid (  ) 

Used to check is a session is valid in a view

Returns:
boolean public

Definition at line 163 of file session.php.

References __start(), and valid().

SessionHelper::write (  ) 

Override CakeSession::write(). This method should not be used in a view

Returns:
boolean public

Definition at line 175 of file session.php.

References __(), and a().


Member Data Documentation

SessionHelper::$__active = true

Definition at line 52 of file session.php.

SessionHelper::$helpers = null

Definition at line 46 of file session.php.


The documentation for this class was generated from the following file:
Generated on Sun Nov 22 00:30:56 2009 for CakePHP 1.2.x.x (v1.2.4.8284) by doxygen 1.4.7