File/nasmail/functions/tree.php

Description

tree.php

This file provides functions to walk trees of folders, for instance to delete a whole tree.

  • version: $Id: tree.php 428 2007-06-22 06:48:41Z tokul $
  • copyright: (c) 1999-2006 The SquirrelMail Project Team
  • copyright: (c) 2006-2007 The NaSMail Project
  • license: GNU Public License
Includes
 include_once (SM_PATH.'functions/imap.php') (line 17)

Clearly, this needs the IMAP functions..

Functions
addChildNodeToTree (line 55)

Will insert a new value into the tree, based on a given comparison value.

void addChildNodeToTree (mixed $comparisonValue, mixed $value, array &$tree)
  • mixed $comparisonValue: comparisonValue the value to determine where the new element should be placed.
  • mixed $value: value the new node to insert
  • array &$tree: tree the tree to insert the node in, by ref
findParentForChild (line 27)

Recursive function to find the correct parent for a new node.

  • return: the index of the parent
int findParentForChild (mixed $value, int $treeIndexToStart, array $tree)
  • mixed $value: value the value to find a parent for
  • int $treeIndexToStart: treeIndexToStart where to start the search, usually the root node (0)
  • array $tree: tree the tree to search
simpleWalkTreePre (line 173)

Recursive function that outputs a tree In-Pre-Order.

void simpleWalkTreePre (int $index, array $tree)
  • int $index: index the node to start (usually 0)
  • array $tree: tree the tree to walk
walkTreeInPostOrderCreatingFoldersUnderTrash (line 135)

Recursively walk a tree of folders to create them under the trash folder.

void walkTreeInPostOrderCreatingFoldersUnderTrash ( $index,  $imap_stream,  $tree,  $topFolderName)
  • $index
  • $imap_stream
  • $tree
  • $topFolderName
walkTreeInPreOrderDeleteFolders (line 121)

Recursively delete a tree of mail folders.

void walkTreeInPreOrderDeleteFolders (int $index, stream $imap_stream, array $tree)
  • int $index: index the place in the tree to start, usually 0
  • stream $imap_stream: imap_stream the IMAP connection to send commands to
  • array $tree: tree the tree to walk
walkTreeInPreOrderEmptyTrash (line 82)

Recursively walk the tree of trash mailboxes and delete all folders and messages

void walkTreeInPreOrderEmptyTrash (int $index, stream $imap_stream, array $tree)
  • int $index: index the place in the tree to start, usually 0
  • stream $imap_stream: imap_stream the IMAP connection to send commands to
  • array $tree: tree the tree to walk

Documentation generated on Sun, 22 Nov 2009 17:36:52 +0200 by phpDocumentor 1.4.3