public function create(
        $id,
        $name,
        $lifetime = null,
        $maximumAge = null,
        $domain = null,
        $path = null,
        $secure = null,
        $httpOnly = null
    ) {

        // copy the default session configuration for lifetime from the settings
        if ($lifetime == null) {
            $lifetime = time() + $this->getSessionSettings()->getSessionCookieLifetime();
        }

        // copy the default session configuration for maximum from the settings
        if ($maximumAge == null) {
            $maximumAge = $this->getSessionSettings()->getSessionMaximumAge();
        }

        // copy the default session configuration for cookie domain from the settings
        if ($domain == null) {
            $domain = $this->getSessionSettings()->getSessionCookieDomain();
        }

        // copy the default session configuration for the cookie path from the settings
        if ($path == null) {
            $path = $this->getSessionSettings()->getSessionCookiePath();
        }

        // copy the default session configuration for the secure flag from the settings
        if ($secure == null) {
            $secure = $this->getSessionSettings()->getSessionCookieSecure();
        }

        // copy the default session configuration for the http only flag from the settings
        if ($httpOnly == null) {
            $httpOnly = $this->getSessionSettings()->getSessionCookieHttpOnly();
        }

        // initialize and return the session instance
        $session = Session::emptyInstance();
        $session->init($id, $name, $lifetime, $maximumAge, $domain, $path, $secure, $httpOnly);

        // attach the session to the manager
        $this->attach($session);

        // return the session
        return $session;
    }
public function create(
        $id,
        $name,
        $lifetime = null,
        $maximumAge = null,
        $domain = null,
        $path = null,
        $secure = null,
        $httpOnly = null
    ) {

        // copy the default session configuration for lifetime from the settings
        if ($lifetime == null) {
            $lifetime = time() + $this->getSessionSettings()->getSessionCookieLifetime();
        }

        // copy the default session configuration for maximum from the settings
        if ($maximumAge == null) {
            $maximumAge = $this->getSessionSettings()->getSessionMaximumAge();
        }

        // copy the default session configuration for cookie domain from the settings
        if ($domain == null) {
            $domain = $this->getSessionSettings()->getSessionCookieDomain();
        }

        // copy the default session configuration for the cookie path from the settings
        if ($path == null) {
            $path = $this->getSessionSettings()->getSessionCookiePath();
        }

        // copy the default session configuration for the secure flag from the settings
        if ($secure == null) {
            $secure = $this->getSessionSettings()->getSessionCookieSecure();
        }

        // copy the default session configuration for the http only flag from the settings
        if ($httpOnly == null) {
            $httpOnly = $this->getSessionSettings()->getSessionCookieHttpOnly();
        }

        // initialize and return the session instance
        $session = Session::emptyInstance();
        $session->init($id, $name, $lifetime, $maximumAge, $domain, $path, $secure, $httpOnly);

        // attach the session to the manager
        $this->attach($session);

        // return the session
        return $session;
    }
public function create ( $ id , $ name , $ lifetime = null , $ maximumAge = null , $ domain = null , $ path = null , $ secure = null , $ httpOnly = null ) { // copy the default session configuration for lifetime from the settings if ( $ lifetime == null ) { $ lifetime = time ( ) + $ this -> getSessionSettings ( ) -> getSessionCookieLifetime ( ) ; } // copy the default session configuration for maximum from the settings if ( $ maximumAge == null ) { $ maximumAge = $ this -> getSessionSettings ( ) -> getSessionMaximumAge ( ) ; } // copy the default session configuration for cookie domain from the settings if ( $ domain == null ) { $ domain = $ this -> getSessionSettings ( ) -> getSessionCookieDomain ( ) ; } // copy the default session configuration for the cookie path from the settings if ( $ path == null ) { $ path = $ this -> getSessionSettings ( ) -> getSessionCookiePath ( ) ; } // copy the default session configuration for the secure flag from the settings if ( $ secure == null ) { $ secure = $ this -> getSessionSettings ( ) -> getSessionCookieSecure ( ) ; } // copy the default session configuration for the http only flag from the settings if ( $ httpOnly == null ) { $ httpOnly = $ this -> getSessionSettings ( ) -> getSessionCookieHttpOnly ( ) ; } // initialize and return the session instance $ session = Session :: emptyInstance ( ) ; $ session -> init ( $ id , $ name , $ lifetime , $ maximumAge , $ domain , $ path , $ secure , $ httpOnly ) ; // attach the session to the manager $ this -> attach ( $ session ) ; // return the session return $ session ; }
Creates a new session with the passed session ID and session name if given.

@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

@return \AppserverIo\Psr\Servlet\ServletSessionInterface The requested session
Creates a new session with the passed session ID and session name if given .