ISession

Interface for session.
Source
ISession.php
Extends
IRequestArray
Implementations
Session

Static Methods

regenerate

ISession ISession::regenerate()

Regenerate the session id.

Returns

ISession
object For method chaining

Methods

__construct

ISession $obj = new ISession(array configs=null)

Constructor. Start session. If no config is provided then the session configs defined in the app configs (array or ini file) will be used. If no config is available then the session will be started with default configs.

Arguments

    configs=null (array)
    Session configs
    {
        IDbAbstract database      : null
            database access object name. if this key is set then session data
            will be written on the database,
        bool        memcache      : false
            true=put session repo on the memcache,
        string      path          : PHP's default value
            session file directory,
        string      name          : PHP's default value
            session name,
        int         regenerate    : null
            intervals (minutes) to regenerate session id - will be checked
            on each request,
        string      secret        : null
            if set to a string(secret-key), session id will be regenerated
            on occasions and "UnsafeSession" exception will be thrown if
            the user-agent+secret-key changes,
        int         expire        : null
            expire session manually if the session is older than this number
            of minutes,
        int         cookie_expire : 0     session cookie setting,
        string      cookie_path   : \     session cookie setting,
        string      cookie_domain : ""    session cookie setting,
        bool        cookie_secure : false session cookie setting,
    }
    

Returns

void

id

void $obj->id(array configs=null)

Start session. If no config is provided then the session configs defined in the app configs (array or ini file) will be used. If no config is available then the session will be started with default configs.

Arguments

    configs=null (array)
    Session configs
    {
        IDbAbstract database      : null
            database access object name. if this key is set then session data
            will be written on the database,
        bool        memcache      : false
            true=put session repo on the memcache,
        string      path          : PHP's default value
            session file directory,
        string      name          : PHP's default value
            session name,
        int         regenerate    : null
            intervals (minutes) to regenerate session id - will be checked
            on each request,
        string      secret        : null
            if set to a string(secret-key), session id will be regenerated
            on occasions and "UnsafeSession" exception will be thrown if
            the user-agent+secret-key changes,
        int         expire        : null
            expire session manually if the session is older than this number
            of minutes,
        int         cookie_expire : 0     session cookie setting,
        string      cookie_path   : \     session cookie setting,
        string      cookie_domain : ""    session cookie setting,
        bool        cookie_secure : false session cookie setting,
    }
    

Returns

void