/** * This function returns an object containing information about the message. This output is similar to that over the * imap_fetch_overview function, only instead of an array of message overviews only a single result is returned. The * results are only retrieved from the server once unless passed true as a parameter. * * @param bool $force_reload * * @return \stdClass */ public function getOverview($force_reload = false) { if ($force_reload || empty($this->message_overview)) { // returns an array, and since we just want one message we can grab the only result $results = $this->imap->fetchOverview($this->imap_stream, $this->uid, FT_UID); $this->message_overview = array_shift($results); } return $this->message_overview; }