[imp] IMP_Imap_Tree

Rui Carneiro rui.carneiro at portugalmail.net
Mon Oct 18 09:45:04 UTC 2010


Hi,

After the recent changes on IMP_Imap_Tree I had some problems. I have this
deprecated code:

$subfolders = $imptree->folderList(0, $this->_vars->mbox);

Here it is my example and what I tried:

Folders:

- A
- B
- C
-- C1
-- C2
- D
- F

Code:

$imptree = $GLOBALS['injector']->getInstance('IMP_Imap_Tree');
$imptree->setIteratorFilter(0, 'C');
$subfolders = array_keys(iterator_to_array($imptree));
*
*
Result:

*subfolders ==> array(5){'C', 'C1', 'C2', 'D', 'F'};*
*
*
Should not only C, C1 and C2 be returned? Sorry if I am missing something
trivial here but I am new to PHP5 Iterators .

-- 
Rui Carneiro
Eng. Software
*m.* 963446125

*Portugalmail* | plataformas de inovação
*w.* http://www.portugalmail.net


More information about the imp mailing list