Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
eZMailFolder Class Reference

## Public Member Functions
| __construct ( $id="", $fetch=true)
| delete ( $id=-1)
| store ()
| get ( $id="")
| id ()
| userID ()
| setUser ( $value)
| name ()
| setName ( $value)
| parentID ()
| setParent ( $value)
| folderType ()
| setFolderType ( $value)
| addMail ( $mail, $removeFromOld=true)
| removeMail ( $mail)
| getByParent ( $parent)
& | mail ( $sortmode="subject_asc", $offset=0, $limit=50, $folderID=-1)
| mailCount ()
| deleteAll ()
| count ( $unreadOnly=false, $folderID=-1)
| isChild ( $folderID, $check_for_self=false)

## Static Public Member Functions
static | getByUser ( $user=false, $withSpecialFolders=false, $parentFolder=-1)
static & | getTree ( $parentID=0, $level=0)
static | getSpecialFolder ( $specialType, $user=false)
static | isOwner ( $user, $folderID)

## Public Attributes
| $ID
| $UserID
| $ParentID
| $Name
| $FolderType =0
| $IsPublished

## Detailed Description

Definition at line 48 of file ezmailfolder.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZMailFolder::__construct | ( |  | $id = `""`,
|  |  | $fetch = `true`
| ) |  |

constructor

Definition at line 53 of file ezmailfolder.php.

References $id, and $ID.

## Member Function Documentation

## ◆ addMail()

eZMailFolder::addMail | ( |  | $mail,
|  |  | $removeFromOld = `true`
| ) |  |

Adds a mail to this folder. Returns true if successfull.

Definition at line 247 of file ezmailfolder.php.

References $db, $mail, $query, $res, $results, and eZDB\globalDatabase().

## ◆ count()

eZMailFolder::count | ( |  | $unreadOnly = `false`,
|  |  | $folderID = `-1`
| ) |  |

Returns the number for mail in the folder. If $unreadOnly is set to true the function returns the number of unread mails. If you specify the folderID this function can be used as an static function.

Definition at line 450 of file ezmailfolder.php.

References $db, $ID, $res, and eZDB\globalDatabase().

Referenced by deleteAll(), get(), getByParent(), getByUser(), and mail().

## ◆ delete()

eZMailFolder::delete | ( |  | $id = `-1` | ) |

Deletes a eZMailFolder object from the database.

Definition at line 68 of file ezmailfolder.php.

References $db, $id, $ID, $mail, eZDB\globalDatabase(), and mail().

## ◆ deleteAll()

eZMailFolder::deleteAll | ( |  | ) |

Deletes all mail in the folder

Definition at line 435 of file ezmailfolder.php.

References $db, $i, $mail_array, $query, count(), eZMail\delete(), and eZDB\globalDatabase().

## ◆ folderType()

eZMailFolder::folderType | ( |  | ) |

Returns the type of this folder. Valid types are: 0 - Normal user created folder 1 - Inbox 2 - Outbox 3 - Sent mail 4 - Drafts 5 - Trash

Definition at line 225 of file ezmailfolder.php.

References $FolderType.

## ◆ get()

eZMailFolder::get | ( |  | $id = `""` | ) |

Fetches the object information from the database.

Definition at line 130 of file ezmailfolder.php.

References $db, $id, $ret, count(), eZDB\globalDatabase(), and Name.

## ◆ getByParent()

eZMailFolder::getByParent | ( |  | $parent | ) |

Returns all folders with the folder given as parent.

The folder are returned as an array of eZMailFolder objects.

Definition at line 295 of file ezmailfolder.php.

References $category_array, $db, $i, count(), and eZDB\globalDatabase().

## ◆ getByUser()

static eZMailFolder::getByUser | ( |  | $user = `false`,
|  |  | $withSpecialFolders = `false`,
|  |  | $parentFolder = `-1`
| ) |  |
| static

Returns all folders that belongs to this user as an array of eZMailFolders.

Definition at line 328 of file ezmailfolder.php.

References $i, $query, $res, $user, count(), eZUser\currentUser(), and eZDB\globalDatabase().

Referenced by getTree().

## ◆ getSpecialFolder()

static eZMailFolder::getSpecialFolder | ( |  | $specialType,
|  |  | $user = `false`
| ) |  |
| static

Definition at line 477 of file ezmailfolder.php.

References $db, $ini, $Language, $res, $result, $user, eZUser\currentUser(), and eZDB\globalDatabase().

Referenced by eZMailAccount\checkMail(), eZMailFilterRule\doFilter(), eZMailFilter\eZMailFilter(), and save_mail().

## ◆ getTree()

static& eZMailFolder::getTree | ( |  | $parentID = `0`,
|  |  | $level = `0`
| ) |  |
| static

Definition at line 360 of file ezmailfolder.php.

References $folder, $folderList, $level, $tree, and getByUser().

## ◆ id()

eZMailFolder::id | ( |  | ) |

Returns the object ID.

Definition at line 160 of file ezmailfolder.php.

References $ID.

## ◆ isChild()

eZMailFolder::isChild | ( |  | $folderID,
|  |  | $check_for_self = `false`
| ) |  |

Returns true if the given folder is a child (doesn't have to be first level) of this folder. If the second parameter is set to true, the function also checks if the folder given is itself.

Definition at line 545 of file ezmailfolder.php.

References $db, $result, and eZDB\globalDatabase().

## ◆ isOwner()

static eZMailFolder::isOwner | ( |  | $user,
|  |  | $folderID
| ) |  |
| static

Returns true if the given mail belongs to the given user.

Definition at line 571 of file ezmailfolder.php.

References $db, $res, $user, and eZDB\globalDatabase().

## ◆ mail()

& eZMailFolder::mail | ( |  | $sortmode = `"subject_asc"`,
|  |  | $offset = `0`,
|  |  | $limit = `50`,
|  |  | $folderID = `-1`
| ) |  |

Returns all the mail in the folder. $sortmode can be one of the following: subject, sender, date, subjectdec, senderdesc, datedesc. $offset and $limit sets how many mail to return in one bunch and where in the list to start. Static if the folderID is supplied.

Definition at line 386 of file ezmailfolder.php.

References $db, $i, $ID, $limit, $mail_array, $offset, $query, count(), and eZDB\globalDatabase().

Referenced by delete().

## ◆ mailCount()

eZMailFolder::mailCount | ( |  | ) |

Returns the number of mail in this folder

Definition at line 423 of file ezmailfolder.php.

References $db, $query, $result, and eZDB\globalDatabase().

## ◆ name()

eZMailFolder::name | ( |  | ) |

Returns the name of the folder

Definition at line 187 of file ezmailfolder.php.

References $Name.

## ◆ parentID()

eZMailFolder::parentID | ( |  | ) |

Returns the ID of the parent folder.

Definition at line 203 of file ezmailfolder.php.

References $ParentID.

## ◆ removeMail()

eZMailFolder::removeMail | ( |  | $mail | ) |

Removes a mail from this folder

Definition at line 277 of file ezmailfolder.php.

References $db, $mail, $query, and eZDB\globalDatabase().

## ◆ setFolderType()

eZMailFolder::setFolderType | ( |  | $value | ) |

Sets the type of this folder. Valid types are: 0 - Normal user created folder 1 - Inbox 2 - Outbox 3 - Sent mail 4 - Drafts 5 - Trash

Definition at line 239 of file ezmailfolder.php.

## ◆ setName()

eZMailFolder::setName | ( |  | $value | ) |

Sets the name of the folder.

Definition at line 195 of file ezmailfolder.php.

References Name.

## ◆ setParent()

eZMailFolder::setParent | ( |  | $value | ) |

Sets the parent folder.

Definition at line 211 of file ezmailfolder.php.

## ◆ setUser()

eZMailFolder::setUser | ( |  | $value | ) |

Sets the user that owns this object

Definition at line 176 of file ezmailfolder.php.

## ◆ store()

eZMailFolder::store | ( |  | ) |

Stores a mail to the database.

Definition at line 85 of file ezmailfolder.php.

References $db, $name, $result, eZDB\globalDatabase(), and Name.

## ◆ userID()

eZMailFolder::userID | ( |  | ) |

Returns the ID of the owner user

Definition at line 168 of file ezmailfolder.php.

References $UserID.

## Member Data Documentation

## ◆ $FolderType

eZMailFolder::$FolderType =0

Definition at line 589 of file ezmailfolder.php.

Referenced by folderType().

## ◆ $ID

eZMailFolder::$ID

Definition at line 585 of file ezmailfolder.php.

Referenced by __construct(), count(), delete(), id(), and mail().

## ◆ $IsPublished

eZMailFolder::$IsPublished

Definition at line 590 of file ezmailfolder.php.

## ◆ $Name

eZMailFolder::$Name

Definition at line 588 of file ezmailfolder.php.

Referenced by name().

## ◆ $ParentID

eZMailFolder::$ParentID

Definition at line 587 of file ezmailfolder.php.

Referenced by parentID().

## ◆ $UserID

eZMailFolder::$UserID

Definition at line 586 of file ezmailfolder.php.

Referenced by userID().

The documentation for this class was generated from the following file:

- ezmailfolder.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.