Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

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

## Public Member Functions
| __construct ( $id="")
| delete ( $id=-1)
| store ()
| get ( $id="")
| id ()
| owner ()
| setOwner ( $newOwner)
| headerType ()
| setHeaderType ( $value)
| checkType ()
| setCheckType ( $value)
| match ()
| setMatch ( $value)
| isActive ()
| setIsActive ( $value)
| folderID ()
| setFolderID ( $value)
| applyFilter (&$mail)
| doFilter (&$mail)

## Static Public Member Functions
static | getByUser ( $user)

## Public Attributes
| $ID
| $UserID
| $HeaderType
| $CheckType
| $Match
| $FolderID
| $IsActive

## Private Member Functions
& | buildSearchArray (&$mail)

## Detailed Description

Definition at line 60 of file ezmailfilterrule.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZMailFilterRule::__construct | ( |  | $id = `""` | ) |

Constructs a new eZMail object.

If $id is set the object's values are fetched from the database.

Definition at line 68 of file ezmailfilterrule.php.

References $id, and $ID.

## Member Function Documentation

## ◆ applyFilter()

eZMailFilterRule::applyFilter | ( | & | $mail | ) |

Applies the filter rule to a mail. Returns true if the filter was successfull.

define( "FILTER_EQUALS", 0 ); define( "FILTER_NEQUALS", 1 ); define( "FILTER_CONTAINS", 2 ); define( "FILTER_NCONTAINS", 3 ); define( "FILTER_REGEXP", 4 );

Definition at line 309 of file ezmailfilterrule.php.

References $mail, buildSearchArray(), doFilter(), FILTER_CONTAINS, FILTER_EQUALS, FILTER_NCONTAINS, and FILTER_REGEXP.

## ◆ buildSearchArray()

& eZMailFilterRule::buildSearchArray | ( | & | $mail | ) |
| private

Builds an array of data that is to be checked by the apply filter function. This function only uses referenced copying of data, to speed things up. (No actuall copy)

Definition at line 387 of file ezmailfilterrule.php.

References $mail, FILTER_ANY, FILTER_BODY, FILTER_CC, FILTER_FROM, FILTER_MESSAGE, FILTER_SUBJECT, FILTER_TO, and FILTER_TOCC.

Referenced by applyFilter().

## ◆ checkType()

eZMailFilterRule::checkType | ( |  | ) |

Returns the checktype.

Definition at line 213 of file ezmailfilterrule.php.

References $CheckType.

## ◆ delete()

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

Deletes a eZMail object from the database.

Definition at line 80 of file ezmailfilterrule.php.

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

## ◆ doFilter()

eZMailFilterRule::doFilter | ( | & | $mail | ) |

Moves the mail to the desired folder.

Definition at line 452 of file ezmailfilterrule.php.

References $folder, $mail, eZMailFolder\getSpecialFolder(), and INBOX.

Referenced by applyFilter().

## ◆ folderID()

eZMailFilterRule::folderID | ( |  | ) |

Returns the folder that this

Definition at line 262 of file ezmailfilterrule.php.

References $FolderID.

## ◆ get()

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

Fetches the object information from the database.

Definition at line 140 of file ezmailfilterrule.php.

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

## ◆ getByUser()

static eZMailFilterRule::getByUser | ( |  | $user | ) |
| static

Returns all mail filters for a selected user as an array of eZMailFilterRules objects.

Definition at line 280 of file ezmailfilterrule.php.

References $i, $user, and eZDB\globalDatabase().

Referenced by eZMailFilter\eZMailFilter().

## ◆ headerType()

eZMailFilterRule::headerType | ( |  | ) |

Returns the header type to check for.

Definition at line 197 of file ezmailfilterrule.php.

References $HeaderType.

## ◆ id()

eZMailFilterRule::id | ( |  | ) |

Returns the object ID.

Definition at line 170 of file ezmailfilterrule.php.

References $ID.

## ◆ isActive()

eZMailFilterRule::isActive | ( |  | ) |

Returns 1 if the filter is active.

Definition at line 245 of file ezmailfilterrule.php.

References $IsActive.

## ◆ match()

eZMailFilterRule::match | ( |  | ) |

Returns the string that is matched.

Definition at line 229 of file ezmailfilterrule.php.

References $Match.

## ◆ owner()

eZMailFilterRule::owner | ( |  | ) |

Returns the userID of the user that owns this object

Definition at line 178 of file ezmailfilterrule.php.

References $UserID.

## ◆ setCheckType()

eZMailFilterRule::setCheckType | ( |  | $value | ) |

Set the check type.

Definition at line 221 of file ezmailfilterrule.php.

## ◆ setFolderID()

eZMailFilterRule::setFolderID | ( |  | $value | ) |

Sets the folderID of the folder that this filter filters mail into.

Definition at line 270 of file ezmailfilterrule.php.

## ◆ setHeaderType()

eZMailFilterRule::setHeaderType | ( |  | $value | ) |

Sets the header type to check for.

Definition at line 205 of file ezmailfilterrule.php.

## ◆ setIsActive()

eZMailFilterRule::setIsActive | ( |  | $value | ) |

Sets the account active.

Definition at line 254 of file ezmailfilterrule.php.

## ◆ setMatch()

eZMailFilterRule::setMatch | ( |  | $value | ) |

Set the string that the filter is matching.

Definition at line 237 of file ezmailfilterrule.php.

## ◆ setOwner()

eZMailFilterRule::setOwner | ( |  | $newOwner | ) |

Sets the owner of this mail

Definition at line 186 of file ezmailfilterrule.php.

## ◆ store()

eZMailFilterRule::store | ( |  | ) |

Stores a mail to the database.

Definition at line 93 of file ezmailfilterrule.php.

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

## Member Data Documentation

## ◆ $CheckType

eZMailFilterRule::$CheckType

Definition at line 472 of file ezmailfilterrule.php.

Referenced by checkType().

## ◆ $FolderID

eZMailFilterRule::$FolderID

Definition at line 475 of file ezmailfilterrule.php.

Referenced by folderID().

## ◆ $HeaderType

eZMailFilterRule::$HeaderType

Definition at line 471 of file ezmailfilterrule.php.

Referenced by headerType().

## ◆ $ID

eZMailFilterRule::$ID

Definition at line 467 of file ezmailfilterrule.php.

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

## ◆ $IsActive

eZMailFilterRule::$IsActive

Definition at line 476 of file ezmailfilterrule.php.

Referenced by isActive().

## ◆ $Match

eZMailFilterRule::$Match

Definition at line 473 of file ezmailfilterrule.php.

Referenced by match().

## ◆ $UserID

eZMailFilterRule::$UserID

Definition at line 468 of file ezmailfilterrule.php.

Referenced by owner().

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

- ezmailfilterrule.php

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