function getNotice() { $this->id = $this->trimmed('id'); $this->entry = Blog_entry::staticGet('id', $this->id); if (empty($this->entry)) { // TRANS: Client exception thrown when referring to a non-existing blog entry. throw new ClientException(_m('No such entry.'), 404); } $notice = $this->entry->getNotice(); if (empty($notice)) { // TRANS: Client exception thrown when referring to a non-existing blog entry. throw new ClientException(_m('No such entry.'), 404); } return $notice; }
static function fromNotice($notice) { return Blog_entry::staticGet('uri', $notice->uri); }