/** * Returns the list of mailboxes to poll. * * @param boolean $sort Sort the directory list? * * @return array The list of mailboxes to poll (IMP_Mailbox objects). */ public function getPollList($sort = false) { global $injector; $iterator = new IMP_Ftree_IteratorFilter($injector->getInstance('IMP_Ftree')); $iterator->add(array($iterator::CONTAINERS, $iterator::NONIMAP)); if ($this->_data !== true) { $iterator->add($iterator::POLLED); } $plist = array_map('strval', iterator_to_array($iterator, false)); if ($sort) { $this->_ftree->sortList($plist, $this->_ftree[IMP_Ftree::BASE_ELT]); } return IMP_Mailbox::get($plist); }
/** */ public function __set($name, $value) { switch ($name) { case 'container': case 'needsort': case 'open': case 'polled': case 'subscribed': $this->_tree->setAttribute($name, $this->_id, $value); break; } }