Interface Inx_Api_Filter_Filter

Description

An Inx_Api_Filter_Filter is used to define target groups of recipients that share common properties.

An Inx_Api_Filter_Filter is used to define target groups of recipients that share common properties. For example: All recipients born after 1970. To accomplish this, a

  1. Filter
uses a statement. The statement syntax is described in the documentation for #updateStatement(String). For an example on how to create filters, see the Inx_Api_Filter_FilterManager documentation.

  • version: $Revision: 9497 $ $Date: 2007-12-19 17:03:25 +0200 (Tr, 19 Grd 2007) $ $Author: aurimas $
  • see: Inx_Api_Filter_FilterManager
  • since: API 1.1.0

Located in /Api/Filter/Filter.php (line 19)

Inx_Api_BusinessObject
   |
   --Inx_Api_Filter_Filter
Class Constant Summary
Method Summary
string getName ()
string getStatement ()
void updateName (string $sName)
void updateStatement (string $sStmt)
Methods
getCreationDatetime (line 163)

Returns the creation datetime of this filter.

Returns the creation datetime of this filter.

  • return: the creation datetime of this filter. The creation datetime will be returned as ISO 8601 formatted datetime string.
  • access: public
string getCreationDatetime ()
getListContextId (line 154)

Returns the id of the list which this filter belongs to.

Returns the id of the list which this filter belongs to.

  • return: the id of the list which this filter belongs to.
  • access: public
int getListContextId ()
getName (line 51)

Returns the unique name of this filter.

Returns the unique name of this filter.

  • return: the unique name of this filter.
  • access: public
string getName ()
getStatement (line 67)

Returns the statment of this filter.

Returns the statment of this filter. The statement defines the target group of recipients.

  • return: the statment of this filter.
  • access: public
string getStatement ()
updateName (line 59)

Sets the unique name of this filter.

Sets the unique name of this filter.

  • access: public
void updateName (string $sName)
  • string $sName: the unique name of this filter.
updateStatement (line 146)

Sets the filter statement.

Sets the filter statement. The statement defines the target group of recipients. A filter statement consists of at least one condition that recipients must match. Multiple conditions may be composed to a filter using the AND/OR operators. There are four possible condition types which may be used:

  • Column condition: Compares the value of a column.
  • Recipient reaction condition: Checks if a recipient opened a mailing or clicked a link.
  • Filter membership condition: Checks if a recipient is member of a filter.
  • Free expression: Special checks and comparisons.

The following operators may be used to compare columns to a given value or check their content:

  • column = value - checks for equality
  • column <> value - checks for inequality
  • column < value - checks if column value is less than given value
  • column <= value - checks if column value is less than or equal to given value
  • column > value - checks if column value is greater than given value
  • column >= value - checks if column value is greater than or equal to given value
  • column IS_EMPTY - checks if column value is empty
  • column NOT_IS_EMPTY - checks if column value is not empty
The check values have to be specified in the same data type as the column value. The different date types must be specified as follows:
  • Text: "Text" (be sure to escape the double quotes or use single quotes for the filter)
  • Datetime: #01.01.1970 13:37:42# (be sure to put a single whitespace between date and time)
  • Date: #01.01.1970#
  • Time: #13:37:42#
  • Integer: 42
  • Floating point: 47.11
  • Boolean: TRUE or FALSE (attention: case sensitive!)
To specify the column which shall be compared it is best to use the Column("columnName") operator.

Using free expressions you can create more powerful statements. The operators which can be used in free expressions are:

  • column LIKE value: checks for equality (case insensitive)
  • column NOT_LIKE value: checks for inequality (case insensitive)
  • column STARTS_WITH value: checks if column value starts with given value
  • column NOT_STARTS_WITH value: checks if column value does not start with given value
  • column ENDS_WITH value: checks if column value ends with given value
  • column NOT_ENDS_WITH value: checks if column value does not end with given value
  • column CONTAINS value: checks if column value contains given value
  • column NOT_CONTAINS value: checks if column value does not contain given value
All of these operators may be used along with text columns. The check values of free expressions may contain wildcards to match a specific pattern.
<strong>Note:</strong> The wilcard character used in free expressions is NOT the asterisk (*) but the percentage sign (%).

Recipient reaction conditions may be used to select recipients who reacted on a specific mailing or link. The operators used for recipient reaction conditions are:

  • HasOpened(mailingId): checks if the recipient opened the specified mailing
  • HasClickedAnyLink(mailingId): checks if the recipient clicked any link in the specified mailing
  • HasClicked(linkId): checks if the recipient clicked the specified link

Filter membership conditions may be used to select recipients who are (or aren't) member of another filter. The operators used for these checks are:

  • BelongsToGroup(filterName): checks if the recipient is a member of the specified filter.
  • BelongsNotToGroup(filterName): checks if the recipient is not a member of the specified filter.

Please note that date values for the filter have to be specified in german 24-hour date format. To accomplish this, the date() function with the following date pattern can be used:

 $filterDate = date("d.m.Y H:i:s");

  • access: public
void updateStatement (string $sStmt)
  • string $sStmt: the filter statment.

Inherited Methods

Inherited From Inx_Api_BusinessObject

Inx_Api_BusinessObject::commitUpdate()
Inx_Api_BusinessObject::getId()
Inx_Api_BusinessObject::reload()
Class Constants
ATTRIBUTE_CREATION_DATETIME = 2 (line 38)

Constant for the creation datetime attribute.

Constant for the creation datetime attribute. Used as order attribute in select statements.

  • see: Inx_Api_Filter_FilterManager::select($oListContext, $iOrderAttribute, $iOrderType)
ATTRIBUTE_LIST_CONTEXT_ID = 3 (line 43)

Constant for the list context attribute.

Constant for the list context attribute.

ATTRIBUTE_NAME = 0 (line 26)

Constant for the name attribute.

Constant for the name attribute. Used as order attribute in select statements.

  • see: Inx_Api_Filter_FilterManager::select($oListContext, $iOrderAttribute, $iOrderType)
ATTRIBUTE_STATEMENT = 1 (line 31)

Constant for the statement attribute.

Constant for the statement attribute.

Documentation generated on Thu, 17 Sep 2015 14:27:24 +0200 by phpDocumentor 1.3.2