function getTopics($topic) { if (empty($this->topics[$topic])) { throw new Exception('topic "' + $topic + '" is not published.'); } return $this->topics[$topic]; }