public function createId(RequestApplicationInterface $app)
    {
        $ip = $app->reqHelper->getRemoteIP();
        if (empty($ip)) {
            $ip = '127.0.0.1';
        }
        $time = microtime();
        try {
            $rand = \Reaction::$app->security->generateRandomString(16);
        } catch (\Exception $exception) {
            $rand = mt_rand(11111, 99999);
        }
        $id = md5($ip . ':' . $time . ':' . $rand);
        $self = $this;
        return $this->checkSessionId($id)->then(
            function() use($id) { return $id; },
            function() use ($self, &$app) { return $self->createId($app); }
        );
    }
public function createId(RequestApplicationInterface $app)
    {
        $ip = $app->reqHelper->getRemoteIP();
        if (empty($ip)) {
            $ip = '127.0.0.1';
        }
        $time = microtime();
        try {
            $rand = \Reaction::$app->security->generateRandomString(16);
        } catch (\Exception $exception) {
            $rand = mt_rand(11111, 99999);
        }
        $id = md5($ip . ':' . $time . ':' . $rand);
        $self = $this;
        return $this->checkSessionId($id)->then(
            function() use($id) { return $id; },
            function() use ($self, &$app) { return $self->createId($app); }
        );
    }
public function createId ( RequestApplicationInterface $ app ) { $ ip = $ app -> reqHelper -> getRemoteIP ( ) ; if ( empty ( $ ip ) ) { $ ip = '127.0.0.1' ; } $ time = microtime ( ) ; try { $ rand = \ Reaction :: $ app -> security -> generateRandomString ( 16 ) ; } catch ( \ Exception $ exception ) { $ rand = mt_rand ( 11111 , 99999 ) ; } $ id = md5 ( $ ip . ':' . $ time . ':' . $ rand ) ; $ self = $ this ; return $ this -> checkSessionId ( $ id ) -> then ( function ( ) use ( $ id ) { return $ id ; } , function ( ) use ( $ self , & $ app ) { return $ self -> createId ( $ app ) ; } ) ; }
Return a new session ID
@param RequestApplicationInterface $app
@return ExtendedPromiseInterface  with session ID valid for session handler
Return a new session ID