Horde_Imap_Client_Base::getMetadata PHP Method

getMetadata() public method

Get metadata for a given mailbox. The server must support either the IMAP METADATA extension (RFC 5464) or the ANNOTATEMORE extension (http://ietfreport.isoc.org/idref/draft-daboo-imap-annotatemore/).
public getMetadata ( mixed $mailbox, array $entries, array $options = [] ) : array
$mailbox mixed A mailbox. Either a Horde_Imap_Client_Mailbox object or a string (UTF-8).
$entries array The entries to fetch (UTF-8 strings).
$options array Additional options: - depth: (string) Either "0", "1" or "infinity". Returns only the given value (0), only values one level below the specified value (1) or all entries below the specified value (infinity). - maxsize: (integer) The maximal size the returned values may have. DEFAULT: No maximal size.
return array An array with metadata names as the keys and metadata values as the values. If 'maxsize' is set, and entries exist on the server larger than this size, the size will be returned in the key '*longentries'.
    public function getMetadata($mailbox, $entries, array $options = array())
    {
        $this->login();
        if (!is_array($entries)) {
            $entries = array($entries);
        }
        return $this->_getMetadata(Horde_Imap_Client_Mailbox::get($mailbox), array_map(array('Horde_Imap_Client_Utf7imap', 'Utf8ToUtf7Imap'), $entries), $options);
    }