protected function onRun(Session $ses, array $args) { $session = "UNKNOWN"; foreach ((new \ReflectionClass(Session::class))->getConstants() as $name => $value) { if ($value === $ses->getSessionId()) { $session = $name; break; } } return TextFormat::AQUA . "You are in session " . $session . "({$ses->getSessionId()}"; }