public function flushIterator($return = true, $sublevel = true)
{
$out = array();
if ($return) {
$this->_nextModify = array('level' => $sublevel ? $this->_level : 0, 'out' => array());
$this->next();
$out = $this->_nextModify['out'];
$this->_nextModify = array();
} elseif ($sublevel && $this->_level) {
$this->_nextModify = array('level' => $this->_level);
$this->next();
$this->_nextModify = array();
} else {
$this->_stream->end();
$this->_stream->getChar();
$this->_current = $this->_key = $this->_level = false;
}
return $out;
}
/** * Parse a LISTRIGHTS response (RFC 4314 [3.7]). * * @param Horde_Imap_Client_Interaction_Pipeline $pipeline Pipeline * object. * @param Horde_Imap_Client_Tokenize $data The server response. */ protected function _parseListRights(Horde_Imap_Client_Interaction_Pipeline $pipeline, Horde_Imap_Client_Tokenize $data) { // Ignore mailbox and identifier arguments $data->next(); $data->next(); $pipeline->data['listaclrights'] = new Horde_Imap_Client_Data_AclRights(str_split($data->next()), $data->flushIterator()); }