protected function id() { while (true) { $id = uniqid(); if (!array_key_exists($id, $this->events)) { return $id; } } }