OpenMediaVault  0.6 (Kralizec)
The open network attached storage solution
 All Classes Functions Variables Groups Pages
Public Member Functions | Static Public Member Functions | List of all members
OMVSession Class Reference
Inheritance diagram for OMVSession:
OMVObject

Public Member Functions

 start ()
 
 commit ()
 
 destroy ()
 
 initialize ($username, $role)
 
 getRole ()
 
 isAuthenticated ()
 
 getUsername ()
 
 updateLastAccess ()
 
 isTimeout ()
 
 validate ()
 
 dump ()
 
- Public Member Functions inherited from OMVObject
 __construct ()
 
 getLastError ()
 

Static Public Member Functions

static & getInstance ()
 

Additional Inherited Members

- Protected Member Functions inherited from OMVObject
 setLastError ($error)
 
 debug ()
 

Detailed Description

This file is part of OpenMediaVault.

License:
http://www.gnu.org/licenses/gpl.html GPL Version 3
Author
Volker Theile volke.nosp@m.r.th.nosp@m.eile@.nosp@m.open.nosp@m.media.nosp@m.vaul.nosp@m.t.org

OpenMediaVault is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

OpenMediaVault is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with OpenMediaVault. If not, see http://www.gnu.org/licenses/.

Member Function Documentation

OMVSession::commit ( )

Write session data and end session.

OMVSession::destroy ( )

Destroy session.

OMVSession::dump ( )

Dump the current session informations.

static& OMVSession::getInstance ( )
static

Returns the session singleton.

Returns
The session object.
OMVSession::getRole ( )

Get the role of the user from this session.

Returns
Returns the user role, otherwise FALSE.
OMVSession::getUsername ( )

Get the name of the user from this session.

Returns
Returns the current user name, otherwise FALSE.
OMVSession::initialize (   $username,
  $role 
)

Initialize the session.

Parameters
usernameThe user name.
roleThe user role.
Returns
The session id.
OMVSession::isAuthenticated ( )

Is this session authenticated?

Returns
Returns TRUE if the session is authenticated, otherwise FALSE.
OMVSession::isTimeout ( )

Check if the last access if not older than the defined timeout value.

Returns
TRUE if the session is timed out, otherwise FALSE.
OMVSession::start ( )

Start session.

OMVSession::updateLastAccess ( )

Update the time on which the last access took place.

OMVSession::validate ( )

Do some checks. In case of an error an exception is thrown.


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