Open Journal Systems  2.4.4
 All Classes Namespaces Functions Variables Groups Pages
Session Class Reference
Inheritance diagram for Session:
DataObject

Public Member Functions

 getIpAddress ()
 
 getRemember ()
 
 getSecondsCreated ()
 
 getSecondsLastUsed ()
 
 getSessionData ()
 
 getSessionVar ($key)
 
getUser ()
 
 getUserAgent ()
 
 getUserId ()
 
 Session ()
 
 setIpAddress ($ipAddress)
 
 setRemember ($remember)
 
 setSecondsCreated ($created)
 
 setSecondsLastUsed ($lastUsed)
 
 setSessionData ($data)
 
 setSessionVar ($key, $value)
 
 setUserAgent ($userAgent)
 
 setUserId ($userId)
 
 unsetSessionVar ($key)
 
- Public Member Functions inherited from DataObject
 addSupportedMetadataAdapter (&$metadataAdapter)
 
 DataObject ($callHooks=true)
 
extractMetadata (&$metadataSchema)
 
 getAdditionalMetadataFieldNames ()
 
getAllData ()
 
getData ($key, $locale=null)
 
 getHasLoadableAdapters ()
 
 getId ()
 
 getLocaleMetadataFieldNames ()
 
getLocalizedData ($key)
 
 getMetadataFieldNames ($translated=true)
 
 getSetMetadataFieldNames ($translated=true)
 
getSupportedExtractionAdapters ()
 
getSupportedInjectionAdapters ()
 
getSupportedMetadataSchemas ()
 
 hasData ($key, $locale=null)
 
 injectMetadata (&$metadataDescription)
 
 removeSupportedMetadataAdapter ($metadataSchemaName)
 
 setAllData (&$data)
 
 setData ($key, $value, $locale=null)
 
 setHasLoadableAdapters ($hasLoadableAdapters)
 
 setId ($id)
 
upcastTo (&$targetObject)
 

Public Attributes

 $user
 
- Public Attributes inherited from DataObject
 $_data = array()
 

Detailed Description

Maintains user state information from one request to the next.

See Also
SessionDAO

Definition at line 21 of file Session.inc.php.

Member Function Documentation

Session::getIpAddress ( )

Get IP address.

Returns
string

Definition at line 98 of file Session.inc.php.

References DataObject\getData().

Session::getRemember ( )

Check if session is to be saved across browser sessions.

Returns
boolean

Definition at line 162 of file Session.inc.php.

References DataObject\getData().

Session::getSecondsCreated ( )

Get time (in seconds) since session was created.

Returns
int

Definition at line 130 of file Session.inc.php.

References DataObject\getData().

Session::getSecondsLastUsed ( )

Get time (in seconds) since session was last used.

Returns
int

Definition at line 146 of file Session.inc.php.

References DataObject\getData().

Session::getSessionData ( )

Get all session parameters.

Returns
array

Definition at line 178 of file Session.inc.php.

References DataObject\getData().

Session::getSessionVar (   $key)

Get a session variable's value.

Parameters
$keystring
Returns
mixed

Definition at line 38 of file Session.inc.php.

& Session::getUser ( )

Get user associated with this session (null if anonymous user).

Returns
User

Definition at line 194 of file Session.inc.php.

References $user.

Session::getUserAgent ( )

Get user agent.

Returns
string

Definition at line 114 of file Session.inc.php.

References DataObject\getData().

Session::getUserId ( )

Get user ID (0 if anonymous user).

Returns
int

Definition at line 71 of file Session.inc.php.

References DataObject\getData().

Session::Session ( )

Constructor.

Definition at line 29 of file Session.inc.php.

Session::setIpAddress (   $ipAddress)

Set IP address.

Parameters
$ipAddressstring

Definition at line 106 of file Session.inc.php.

References DataObject\setData().

Session::setRemember (   $remember)

Set whether session is to be saved across browser sessions.

Parameters
$rememberboolean

Definition at line 170 of file Session.inc.php.

References DataObject\setData().

Session::setSecondsCreated (   $created)

Set time (in seconds) since session was created.

Parameters
$createdint

Definition at line 138 of file Session.inc.php.

References DataObject\setData().

Session::setSecondsLastUsed (   $lastUsed)

Set time (in seconds) since session was last used.

Parameters
$lastUsedint

Definition at line 154 of file Session.inc.php.

References DataObject\setData().

Session::setSessionData (   $data)

Set session parameters.

Parameters
$dataarray

Definition at line 186 of file Session.inc.php.

References DataObject\setData().

Session::setSessionVar (   $key,
  $value 
)

Get a session variable's value.

Parameters
$keystring
$valuemixed
Returns
mixed

Definition at line 48 of file Session.inc.php.

Session::setUserAgent (   $userAgent)

Set user agent.

Parameters
$userAgentstring

Definition at line 122 of file Session.inc.php.

References DataObject\setData().

Session::setUserId (   $userId)

Set user ID.

Parameters
$userIdint

Definition at line 79 of file Session.inc.php.

References DAORegistry\getDAO(), DataObject\getData(), and DataObject\setData().

Session::unsetSessionVar (   $key)

Unset (delete) a session variable.

Parameters
$keystring

Definition at line 57 of file Session.inc.php.

Member Data Documentation

Session::$user

The User object associated with this session

Definition at line 24 of file Session.inc.php.

Referenced by getUser().


The documentation for this class was generated from the following file: