private function getFiltered(bool $public = true): array
    {
        $result = [];
        foreach ($this->events as $event) {
            if ($event['is_public'] === $public) {
                $result[] = $event;
            }
        }
        return $result;
    }