public function init($id, $name, $lifetime, $maximumAge, $domain, $path, $secure, $httpOnly, $lastActivityTimestamp = null)
    {
        // initialize the session
        $this->id = $id;
        $this->name = $name;
        $this->lifetime = $lifetime;
        $this->maximumAge = $maximumAge;
        $this->domain = $domain;
        $this->path = $path;
        $this->secure = $secure;
        $this->httpOnly = $httpOnly;

        // the UNIX timestamp where the last action on this session happens
        if ($lastActivityTimestamp == null) {
            $this->lastActivityTimestamp = time();
        } else {
            $this->lastActivityTimestamp = $lastActivityTimestamp;
        }
    }
public function init($id, $name, $lifetime, $maximumAge, $domain, $path, $secure, $httpOnly, $lastActivityTimestamp = null)
    {
        // initialize the session
        $this->id = $id;
        $this->name = $name;
        $this->lifetime = $lifetime;
        $this->maximumAge = $maximumAge;
        $this->domain = $domain;
        $this->path = $path;
        $this->secure = $secure;
        $this->httpOnly = $httpOnly;

        // the UNIX timestamp where the last action on this session happens
        if ($lastActivityTimestamp == null) {
            $this->lastActivityTimestamp = time();
        } else {
            $this->lastActivityTimestamp = $lastActivityTimestamp;
        }
    }
public function init ( $ id , $ name , $ lifetime , $ maximumAge , $ domain , $ path , $ secure , $ httpOnly , $ lastActivityTimestamp = null ) { // initialize the session $ this -> id = $ id ; $ this -> name = $ name ; $ this -> lifetime = $ lifetime ; $ this -> maximumAge = $ maximumAge ; $ this -> domain = $ domain ; $ this -> path = $ path ; $ this -> secure = $ secure ; $ this -> httpOnly = $ httpOnly ; // the UNIX timestamp where the last action on this session happens if ( $ lastActivityTimestamp == null ) { $ this -> lastActivityTimestamp = time ( ) ; } else { $ this -> lastActivityTimestamp = $ lastActivityTimestamp ; } }
Initializes the session with the passed data.

@param mixed             $id                    The session ID
@param string            $name                  The session name
@param integer|\DateTime $lifetime              Date and time after the session expires
@param integer|null      $maximumAge            Number of seconds until the session expires
@param string|null       $domain                The host to which the user agent will send this cookie
@param string            $path                  The path describing the scope of this cookie
@param boolean           $secure                If this cookie should only be sent through a "secure" channel by the user agent
@param boolean           $httpOnly              If this cookie should only be used through the HTTP protocol
@param integer|null      $lastActivityTimestamp The timestamp when the session has been touched the last time

@return void
Initializes the session with the passed data .