3.5.2.2. session

File: classes/session.php
The session class is the interface to PHP session management. This class is set up automatically via including the prepare.php file. The class instance should never be destroyed. This classes descends from the abstract EWE_Session class (in Sessions.php).

3.5.2.2.1. start

Format: $result = start()
Example: $text = $session->start();

This method starts a session if one is not already started. If it succeeds, it returns TRUE, otherwise it returns FALSE.

3.5.2.2.2. close

Format: $result = close()
Example: $text = $session->close();

This method ends the current session and stores the session data. Returns TRUE on success or FALSE on failure.

3.5.2.2.3. regenerate_id

Format: $result = regenerate_id()
Example: $text = $session->regenerate_id();

This method regenerates the session ID. Returns TRUE on success or FALSE on failure.

3.5.2.2.4. flush

Format: $result = flush()
Example: $text = $session->flush();

This method forces the session data to be written to the session file. This normally happens when the current PHP file ends, but this method can cause it to happen sooner. Returns TRUE on success or FALSE on failure.

3.5.2.2.5. _set

Format: _set( $name, $value )
where $name is the session variable name and $value is the value to set it to
Example: $session->_set( 'item', $id );

This method sets the specified session varaible to the specified value.

3.5.2.2.6. _get

Format: $result = _get( $name )
Example: $id = $session->_get( 'item' );

This method returns the specified session variable. If the variable does not exist, NULL is returned.

3.5.2.2.7. _isset

Format: $result = _isset( $name )
Example: if( $session->_isset( 'item' ) ) echo $session->_get( 'item' );

This method returns TRUE if the specified session variable is set, or FALSE otherwise.

3.5.2.2.8. _unset

Format: _unset( $name )
Example: $session->_unset( 'item' );

This method unsets the specified session variable.