protected function sessionStartNew($cb = null)
    {
        FileSystem::tempnam(session_save_path(), $this->sessionPrefix, function ($fp) use ($cb) {
            if (!$fp) {
                $cb(false);
                return;
            }

            $this->sessionFp = $fp;
            $this->sessionId = substr(basename($fp->path), mb_orig_strlen($this->sessionPrefix));
            $this->setcookie(
                ini_get('session.name'),
                $this->sessionId,
                ini_get('session.cookie_lifetime'),
                ini_get('session.cookie_path'),
                ini_get('session.cookie_domain'),
                ini_get('session.cookie_secure'),
                ini_get('session.cookie_httponly')
            );

            $cb(true);
        });
    }
protected function sessionStartNew($cb = null)
    {
        FileSystem::tempnam(session_save_path(), $this->sessionPrefix, function ($fp) use ($cb) {
            if (!$fp) {
                $cb(false);
                return;
            }

            $this->sessionFp = $fp;
            $this->sessionId = substr(basename($fp->path), mb_orig_strlen($this->sessionPrefix));
            $this->setcookie(
                ini_get('session.name'),
                $this->sessionId,
                ini_get('session.cookie_lifetime'),
                ini_get('session.cookie_path'),
                ini_get('session.cookie_domain'),
                ini_get('session.cookie_secure'),
                ini_get('session.cookie_httponly')
            );

            $cb(true);
        });
    }
protected function sessionStartNew ( $ cb = null ) { FileSystem :: tempnam ( session_save_path ( ) , $ this -> sessionPrefix , function ( $ fp ) use ( $ cb ) { if ( ! $ fp ) { $ cb ( false ) ; return ; } $ this -> sessionFp = $ fp ; $ this -> sessionId = substr ( basename ( $ fp -> path ) , mb_orig_strlen ( $ this -> sessionPrefix ) ) ; $ this -> setcookie ( ini_get ( 'session.name' ) , $ this -> sessionId , ini_get ( 'session.cookie_lifetime' ) , ini_get ( 'session.cookie_path' ) , ini_get ( 'session.cookie_domain' ) , ini_get ( 'session.cookie_secure' ) , ini_get ( 'session.cookie_httponly' ) ) ; $ cb ( true ) ; } ) ; }
Start new session
@param  callable $cb Callback
@return void
Start new session