Interface Inx_Api_GeneralMailing_GeneralMailingQuery

Description

The Inx_Api_GeneralMailing_GeneralMailingQuery object is used for constructing and executing general mailing queries.

The Inx_Api_GeneralMailing_GeneralMailingQuery object is used for constructing and executing general mailing queries. The following filters can be defined:

  • Mailing IDs
  • Mailing types
  • Mailing names
  • Mailing subjects
  • Earliest mailing creation date
  • Latest mailing creation date
  • Earliest mailing modification date
  • Latest mailing modification date
  • List ids
The defined filters are additive (logical AND) but allow any field value if undefined. In addition, the query can define a result ordering by any Inx_Api_GeneralMailing_GeneralMailingAttribute. The methods implement a fluent API and thus can be chained. It is possible to set each filter multiple times, but each subsequent set call will overwrite the previous configuration of this filter.

An empty Inx_Api_GeneralMailing_GeneralMailingQuery object can be obtained from the Inx_Api_GeneralMailing_GeneralMailingManager.

The following snippet shows how to construct and execute a query for all regular and split-test mailings of a particular list, ordered ascending by mailing name:

 $oGeneralMailingManager = $oSession->getGeneralMailingManager();
 $oGeneralMailingQuery = $oGeneralMailingManager->createQuery();

 $aMailingTypes = array( Inx_Api_GeneralMailing_MailingType::REGULAR_MAILING(),
      Inx_Api_GeneralMailing_MailingType::SPLIT_TEST_MAILING() );
 $aListIds = array( 3 );

 $oROBOResultSet = $oGeneralMailingQuery->mailingTypes( $aMailingTypes )->listIds( $aListIds )
      ->sort(	Inx_Api_GeneralMailing_GeneralMailingAttribute::NAME(), Inx_Api_Order::ASC )
      ->executeQuery();

 foreach( $oROBOResultSet as $oMailing )
 {
 	echo $oMailing->getName()."<br>";
 }

 $oROBOResultSet->close();

Note: The Inxmail server will check the session user's access permissions in any case and thus will provide accessible mailings only.

  • since: API 1.11.10

Located in /Api/GeneralMailing/GeneralMailingQuery.php (line 57)


	
			
Method Summary
Methods
createdAfter (line 147)

Sets the filter for earliest mailing creation date. Inx_Api_GeneralMailing_GeneralMailingQuery will provide mailings created at and after the given date only.

Sets the filter for earliest mailing creation date. The resulting Inx_Api_GeneralMailing_GeneralMailingQuery will provide mailings created at and after the given date only. Any previously set earliest mailing creation date filter will be overwritten. If null is provided, this will reset the earliest mailing creation date filter.

  • return: the modified GeneralMailingQuery
  • access: public
Inx_Api_GeneralMailing_GeneralMailingQuery createdAfter (string $sSince)
  • string $sSince: the creation date to be set as filter. The date has to be formatted as an ISO 8601 date string.
createdBefore (line 160)

Sets the filter for latest mailing creation date. will provide mailings created at and before the given date only. filter will be overwritten.

Sets the filter for latest mailing creation date. The resulting Inx_Api_GeneralMailing_GeneralMailingQuery will provide mailings created at and before the given date only. Any previously set latest mailing creation date filter will be overwritten. If null is provided, this will reset the latest mailing creation date filter.

  • return: the modified GeneralMailingQuery
  • access: public
Inx_Api_GeneralMailing_GeneralMailingQuery createdBefore (string $sUntil)
  • string $sUntil: the creation date to be set as filter. The date has to be formatted as an ISO 8601 date string.
createdBetween (line 176)

Sets the filters for earliest and latest mailing creation dates. Inx_Api_GeneralMailing_GeneralMailingQuery will provide mailings created at and between the given dates.

Sets the filters for earliest and latest mailing creation dates. The resulting Inx_Api_GeneralMailing_GeneralMailingQuery will provide mailings created at and between the given dates. Any previously set creation date filter (earliest and latest) will be overwritten. If null is provided as start date, this will reset the earliest mailing creation date filter. If null is provided as end date, this will reset the latest mailing creation date filter.

  • return: the modified GeneralMailingQuery
  • access: public
Inx_Api_GeneralMailing_GeneralMailingQuery createdBetween (string $sStart, string $sEnd)
  • string $sStart: the date to be set as earliest mailing creation date filter. The date has to be formatted as an ISO 8601 date string.
  • string $sEnd: the date to be set as latest mailing creation date filter. The date has to be formatted as an ISO 8601 date string.
executeQuery (line 245)

Executes this Inx_Api_GeneralMailing_GeneralMailingQuery.

Executes this Inx_Api_GeneralMailing_GeneralMailingQuery. Returns a ROBOResultSet in the specified order containing all Inx_Api_GeneralMailing_GeneralMailings, that pass all specified filters. Unspecified filters are ignored, any value will pass for their fields. All specified filters are combined with a logical AND.

  • return: A Inx_Api_ROBOResultSet containing all Inx_Api_GeneralMailing_GeneralMailings, that pass all specified filters
  • throws: Inx_Api_SecurityException if an explicitly requested list is not accessible by the session user
  • access: public
Inx_Api_ROBOResultSet executeQuery ()
listIds (line 88)

Sets the filter for list IDs.

Sets the filter for list IDs. The resulting Inx_Api_GeneralMailing_GeneralMailingQuery will provide mailings from the given lists only. Any previously set list filter will be overwritten. If null or an empty array is provided, this will reset the list filter.

Invalid or inexistent listIds will be included in the query. The resultset will be empty if there had been no valid list ID.

Note: If this filter includes the ID of an inaccessible list, this will cause a Inx_Api_SecurityException during query execution.

  • return: the modified Inx_Api_GeneralMailing_GeneralMailingQuery
  • access: public
Inx_Api_GeneralMailing_GeneralMailingQuery listIds ([ $listIds = null])
  • array $listIds: the IDs of the lists to be set as filter
mailingIds (line 104)

Sets the filter for mailing IDs.

Sets the filter for mailing IDs. The resulting Inx_Api_GeneralMailing_GeneralMailingQuery will provide mailings with the given IDs only. Any previously set mailing ID filter will be overwritten. If null or an empty array is provided, this will reset the mailing ID filter.

Invalid or inexistent mailing IDs will be included in the query. The resultset will be empty if there had been no valid mailing ID.

Note: If this filter includes the ID of a mailing whose list is inaccessible, this will cause a Inx_Api_SecurityException during query execution.

  • return: the modified Inx_Api_GeneralMailing_GeneralMailingQuery
  • access: public
Inx_Api_GeneralMailing_GeneralMailingQuery mailingIds ([ $mailingIds = null])
  • array $mailingIds: the mailing IDs to be set as filter
mailingTypes (line 73)

Sets the filter for Inx_Api_GeneralMailing_MailingTypes.

Sets the filter for Inx_Api_GeneralMailing_MailingTypes. The resulting Inx_Api_GeneralMailing_GeneralMailingQuery will provide mailings of the given $types only. Any previously set Inx_Api_GeneralMailing_MailingType filter will be overwritten. If null or an empty array is provided, this will reset the Inx_Api_GeneralMailing_MailingType filter.

null values in the given $types will be ignored.

  • return: the modified Inx_Api_GeneralMailing_GeneralMailingQuery
  • throws: Inx_Api_IllegalArgumentException if one of the provided types is Inx_Api_GeneralMailing_MailingType::UNKNOWN
  • access: public
Inx_Api_GeneralMailing_GeneralMailingQuery mailingTypes ([ $types = null])
  • array $types: the Inx_Api_GeneralMailing_MailingTypes to be set as filter
modifiedAfter (line 189)

Sets the filter for earliest mailing modification date. Inx_Api_GeneralMailing_GeneralMailingQuery will provide mailings modified at and after the given date only.

Sets the filter for earliest mailing modification date. The resulting Inx_Api_GeneralMailing_GeneralMailingQuery will provide mailings modified at and after the given date only. Any previously set earliest mailing modification date filter will be overwritten. If null is provided, this will reset the earliest mailing modification date filter.

  • return: the modified GeneralMailingQuery
  • access: public
Inx_Api_GeneralMailing_GeneralMailingQuery modifiedAfter (string $sSince)
  • string $sSince: the modification date to be set as filter. The date has to be formatted as an ISO 8601 date string.
modifiedBefore (line 202)

Sets the filter for latest mailing modification date. Inx_Api_GeneralMailing_GeneralMailingQuery will provide mailings modified at and before the given date only.

Sets the filter for latest mailing modification date. The resulting Inx_Api_GeneralMailing_GeneralMailingQuery will provide mailings modified at and before the given date only. Any previously set latest mailing modification date filter will be overwritten. If null is provided, this will reset the latest mailing modification date filter.

  • return: the modified GeneralMailingQuery
  • access: public
Inx_Api_GeneralMailing_GeneralMailingQuery modifiedBefore (string $sUntil)
  • string $sUntil: the modification date to be set as filter. The date has to be formatted as an ISO 8601 date string.
modifiedBetween (line 218)

Sets the filters for earliest and latest mailing modification dates. Inx_Api_GeneralMailing_GeneralMailingQuery will provide mailings modified at and between the given dates.

Sets the filters for earliest and latest mailing modification dates. The resulting Inx_Api_GeneralMailing_GeneralMailingQuery will provide mailings modified at and between the given dates. Any previously set modification date filter (earliest and latest) will be overwritten. If null is provided as start date, this will reset the earliest mailing modification date filter. If null is provided as end date, this will reset the latest mailing modification date filter.

  • return: the modified GeneralMailingQuery
  • access: public
Inx_Api_GeneralMailing_GeneralMailingQuery modifiedBetween (string $sStart, string $sEnd)
  • string $sStart: the date to be set as earliest mailing modification date filter. The date has to be formatted as an ISO 8601 date string.
  • string $sEnd: the date to be set as latest mailing modification date filter. The date has to be formatted as an ISO 8601 date string.
names (line 120)

Sets the filter for mailing names.

Sets the filter for mailing names. The resulting Inx_Api_GeneralMailing_GeneralMailingQuery will provide mailings matching any given name only. Any previously set mailing name filter will be overwritten. If null or an empty array is provided, this will reset the mailing name filter.

null values in the given $names will be ignored. If an empty String is provided, it will be included in the query.

  • return: the modified Inx_Api_GeneralMailing_GeneralMailingQuery
  • access: public
Inx_Api_GeneralMailing_GeneralMailingQuery names ([ $names = null])
  • array $names: the mailing names to be set as filter
sort (line 233)

Sets ordering attribute and ordering direction.

Sets ordering attribute and ordering direction. The resulting Inx_Api_GeneralMailing_GeneralMailingQuery will be ordered by the provided Inx_Api_GeneralMailing_GeneralMailingAttribute in the specified Inx_Api_Order. Any previously set ordering will be overwritten. If null is provided as $attribute, this will cause a Inx_Api_NullPointerException.

  • return: the modified Inx_Api_GeneralMailing_GeneralMailingQuery
  • throws: Inx_Api_NullPointerException if the provided $attribute is null
  • throws: Inx_Api_IllegalArgumentException if the provided $attribute is Inx_Api_GeneralMailing_GeneralMailingAttribute::UNKNOWN or if the provided $iOrderType is invalid
  • access: public
subjects (line 134)

Sets the filter for mailing subjects. provide mailings matching any given subject only.

Sets the filter for mailing subjects. The resulting Inx_Api_GeneralMailing_GeneralMailingQuery will provide mailings matching any given subject only. Any previously set mailing subject filter will be overwritten. If null or an empty array is provided, this will reset the mailing subject filter.

null values in the given subjects will be ignored. If an empty String is provided, it will be included in the query.

  • return: the modified GeneralMailingQuery
  • access: public
Inx_Api_GeneralMailing_GeneralMailingQuery subjects ([ $subjects = null])
  • array() $subjects: of string $subjects the mailing subjects to be set as filter

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