lithium\storage\session\adapter\Php::key PHP Method

key() public method

Sets or obtains the session ID.
public key ( string $key = null ) : mixed
$key string Optional. If specified, sets the session ID to the value of `$key`.
return mixed Session ID, or `null` if the session has not been started.
    public function key($key = null)
    {
        if ($key !== null) {
            return session_id($key);
        }
        return session_id() ?: null;
    }