Horde_Imap_Client_Fetch_Query::uid PHP Method

uid() public method

Return the unique ID of the message.
public uid ( )
    public function uid()
    {
        $this->_data[Horde_Imap_Client::FETCH_UID] = true;
    }

Usage Example

Ejemplo n.º 1
0
 public function getMessages($from = 0, $count = 2)
 {
     $total = $this->getTotalMessages();
     if ($from + $count > $total) {
         $count = $total - $from;
     }
     $headers = array();
     $fetch_query = new \Horde_Imap_Client_Fetch_Query();
     $fetch_query->envelope();
     $fetch_query->flags();
     $fetch_query->seq();
     $fetch_query->size();
     $fetch_query->uid();
     $fetch_query->imapDate();
     $headers = array_merge($headers, array('importance', 'list-post', 'x-priority'));
     $headers[] = 'content-type';
     $fetch_query->headers('imp', $headers, array('cache' => true, 'peek' => true));
     $opt = array('ids' => $from + 1 . ':' . ($from + 1 + $count));
     $opt = array();
     // $list is an array of Horde_Imap_Client_Data_Fetch objects.
     $headers = $this->conn->fetch($this->folder_id, $fetch_query, $opt);
     ob_start();
     // fix for Horde warnings
     $messages = array();
     foreach ($headers as $message_id => $header) {
         $message = new Message($this->conn, $this->folder_id, $message_id);
         $message->setInfo($header);
         $messages[] = $message->getListArray();
     }
     ob_clean();
     return $messages;
 }
All Usage Examples Of Horde_Imap_Client_Fetch_Query::uid