Class CApiMailFolderCollection
	
	Collection for work with mail folders.
	 
	
		- 
MailSo\Base\Collection
			
			
		
 
		- 
			
CApiMailFolderCollection			
			
			
		 
	
	
		
		
		
		Package: Mail\
Classes
			Located at mail/classes/folder-collection.php		
	
 
		
			Methods summary
			
		
			
				 protected 
				
				
				
			 | 
			
			#
			__construct( )
			
				Initializes collection property. 
			 
			
				Initializes collection property. 
			 
			  | 
		
		
			
				 public static
				CApiMailFolderCollection
				
				
			 | 
			
			#
			createInstance( )
			
				Creates new instance of the object. 
			 
			
				Creates new instance of the object. 
					Returns
					
			 
			  | 
		
		
			
				 public 
				CApiMailFolder
				&
				
			 | 
			
			#
			getFolder( string $sFullNameRaw, boolean $bRec = false )
			
				Locates folder within the collection by its full name. 
			 
			
				Locates folder within the collection by its full name. 
					Parameters
					
						- $sFullNameRaw
 
						- Raw full name of the folder.
 
						- $bRec
 
						- = false. If true, full recursive search is performed.
 
					  
					Returns
					
			 
			  | 
		
		
			
				 public 
				string
				
				
			 | 
			
			#
			getNamespace( )
			
				Returns namespace of folders. 
			 
			
				Returns namespace of folders. 
					Returns
					
						string
					 
			 
			  | 
		
		
			
				 public 
				CApiMailFolderCollection
				
				
			 | 
			
			#
			setNamespace( string $sNamespace )
			
				Modifies namespace information of folders. 
			 
			
				Modifies namespace information of folders. 
					Parameters
					
						- $sNamespace
 
						- New namespace string.
 
					  
					Returns
					
			 
			  | 
		
		
			
				 protected 
				integer
				
				
			 | 
			
			#
			__sortHelper( CApiMailFolder $oFolderA, CApiMailFolder $oFolderB )
			
				Compares items for sorting. 
			 
			
				Compares items for sorting. 
					Parameters
					
						- $oFolderA
 
						- First item to compare.
 
						- $oFolderB
 
						- Second item to compare.
 
					  
					Returns
					
						integer
					 
			 
			  | 
		
		
			
				 public 
				
				
				
			 | 
			
			#
			initialize( array $aUnsortedMailFolders )
			
				Initializes collection by unsorted mail folders. 
			 
			
				Initializes collection by unsorted mail folders. 
					Parameters
					
						- $aUnsortedMailFolders
 
						- Unsorted mail folder list.
 
					  
			 
			  | 
		
		
			
				 public 
				
				
				
			 | 
			
			#
			sort( callable $fCallback )
			
				Sorts folders of the collection using custom callback function. 
			 
			
				Sorts folders of the collection using custom callback function. 
					Parameters
					
						- $fCallback
 
						- Custom callback function for sorting.
 
					  
			 
			  | 
		
		
			
				 public 
				boolean
				
				
			 | 
			
			#
			addFolder( CApiMailFolder $oMailFolder )
			
				Searches suitable position in collection and adds mail folder. 
			 
			
				Searches suitable position in collection and adds mail folder. 
					Parameters
					
						- $oMailFolder
 
						- Mail folder for adding to collection.
 
					  
					Returns
					
						boolean Returns true if folder was added.
					 
			 
			  | 
		
		
			
				 public 
				
				
				
			 | 
			
			#
			foreachWithSubFolders( mixed $mCallback )
			
				Iterates through list of folders including all the subfolders. 
			 
			
				Iterates through list of folders including all the subfolders. 
					Parameters
					
						- $mCallback
 
						- Callback function which can be run on each loop iteration.
 
					  
			 
			  | 
		
		
			
				 public 
				
				
				
			 | 
			
			#
			foreachOnlyRoot( mixed $mCallback )
			
				Iterates through list of folders including only root folders, first childs of Inbox and first childs of special GMail account root folder. 
			 
			
				Iterates through list of folders including only root folders, first childs of Inbox and first childs of special GMail account root folder. 
					Parameters
					
						- $mCallback
 
						- Callback function which can be run on each loop iteration.
 
					  
			 
			  | 
		
			
		 
		
            Properties summary
			
		
			
				protected  
				string
			 | 
			
$sNamespace
				
					Information about folder wich includes root folders. If empty there is no such folder. 
				 
				
					Information about folder wich includes root folders. If empty there is no such folder. 
				 
			 | 
			
				
			 |