lithium\storage\session\adapter\Php::key()

public method

Sets or obtains the session ID.

Parameters

  • string $key

    Optional. If specified, sets the session ID to the value of $key.

Returns

mixed

Session ID, or null if the session has not been started.

Source

	public function key($key = null) {
		if ($key !== null) {
			return session_id($key);
		}
		return session_id() ?: null;
	}