Interface Inx_Api_DataAccess_LinkData

Description

An Inx_Api_DataAccess_LinkData object can be used to retrieve information about a specific link accessible through an Inx_Api_DataAccess_LinkDataRowSet.

  • Link id: selectByLink(int)
  • Link name: selectByLinkName(String)
  • Link type: Only available through fluent query interface
  • Link name set: Only available through fluent query interface
  • Mailing id: selectByMailing(int)
  • Recipient id: selectByRecipient(int)
The following example returns a result set containing link data for the specified mailing:

An Inx_Api_DataAccess_LinkData object can be used to retrieve information about a specific link accessible through an Inx_Api_DataAccess_LinkDataRowSet. A row set can be obtained using various filters:

  • Link id: selectByLink(int)
  • Link name: selectByLinkName(String)
  • Link type: Only available through fluent query interface
  • Link name set: Only available through fluent query interface
  • Mailing id: selectByMailing(int)
  • Recipient id: selectByRecipient(int)
The following example returns a result set containing link data for the specified mailing:
 $oDataAccess = $oSession->getDataAccess();
 $oLinkData = $oDataAccess->getLinkDataWithNewLinkType();
 ...
 $oLinkDataRowSet = $oLinkData->selectByMailing( $iMailingId, FALSE );
API version 1.12.1 allows you to filter by the type of the link or whether a link name is set at all, in addition to all previous filter possibilities. Offering all possible combinations would have made figuring out which method is the right one a tedious job. Therefore, these filter types are only available using the new fluent style query API. The query API also allows to specify arrays of IDs. The following snippet demonstrates how to filter the links by two mailings, two link types and a recipient:
 $oDa = $oSession->getDataAccess();
 $oLd = $oDa->getLinkDataWithNewLinkType();
 $oQuery = $oLd->createQuery();

 $aMailingIds = array( 1234, 4711);
 $aLinkTypes = array(
          Inx_Api_DataAccess_LinkDataRowSet::LINK_TYPE_REDIRECT,
          Inx_Api_DataAccess_LinkDataRowSet::LINK_TYPE_OPENING_COUNT,
          Inx_Api_DataAccess_LinkDataRowSet::LINK_TYPE_UNIQUE_COUNT);
 $aRecipientIds = array( 567 );

 $oRowSet = $oQuery->mailings( $aMailingIds )->linkTypes( $aLinkTypes )->recipients( $aRecipientIds )->executeQuery();
For more information on the data available for links, see the Inx_Api_DataAccess_LinkDataRowSet documentation.

Located in /Api/DataAccess/LinkData.php (line 56)


	
			
Method Summary
Inx_Api_DataAccess_LinkDataRowSet selectByLinkName (string $linkName, [boolean $bPermanentLinksOnly = false])
Inx_Api_DataAccess_LinkDataRowSet selectByMailing ($iMailingId $iMailingId, [boolean $bPermanentLinksOnly = false])
Methods
createQuery (line 122)

Creates a query object which allows to retrieve links using a fluent interface. the links by the following criteria:

  • mailing IDs
  • recipient IDs
  • link IDs
  • link types
  • link names
  • is link name set
  • permanent links only
All filters can be freely combined.

Creates a query object which allows to retrieve links using a fluent interface. Using this object you can filter the links by the following criteria:

  • mailing IDs
  • recipient IDs
  • link IDs
  • link types
  • link names
  • is link name set
  • permanent links only
All filters can be freely combined. Most parameters shall be given as an array. This allows the creation of complex queries while the fluent interface keeps the syntax as concise as possible.

  • return: a LinkDataQuery object which allows to retrieve links using a fluent interface.
  • since: API 1.12.1
  • access: public
selectByLink (line 78)

This method returns a row set containing information about the specified link. row set will be returned.

This method returns a row set containing information about the specified link. If there is no link data, an empty row set will be returned.

  • return: an Inx_Api_DataAccess_LinkDataRowSet object that contains the data produced by the given query.
  • access: public
Inx_Api_DataAccess_LinkDataRowSet selectByLink (in $iLinkId)
  • in $iLinkId: the id of the link.
selectByLinkName (line 101)

This method returns a row set containing information about all links with the given name. data, an empty row set will be returned.

This method returns a row set containing information about all links with the given name. If there is no link data, an empty row set will be returned.

  • return: an Inx_Api_DataAccess_LinkDataRowSet object that contains the data produced by the given query.
  • access: public
Inx_Api_DataAccess_LinkDataRowSet selectByLinkName (string $linkName, [boolean $bPermanentLinksOnly = false])
  • string $linkName: the name of the link.
  • boolean $bPermanentLinksOnly: indicates whether the query will include permanent links only.
selectByMailing (line 67)

This method returns a row set containing information about all links in the specified mailing. link data, an empty row set will be returned.

This method returns a row set containing information about all links in the specified mailing. If there is no link data, an empty row set will be returned.

  • return: an Inx_Api_DataAccess_LinkDataRowSet object that contains the data produced by the given query.
  • access: public
Inx_Api_DataAccess_LinkDataRowSet selectByMailing ($iMailingId $iMailingId, [boolean $bPermanentLinksOnly = false])
  • boolean $bPermanentLinksOnly: indicates whether the query will include permanent links only.
  • $iMailingId $iMailingId: the id of the mailing.
selectByRecipient (line 89)

This method returns a row set containing information about all links that were clicked by the given recipient. there is no link data, an empty row set will be returned.

This method returns a row set containing information about all links that were clicked by the given recipient. If there is no link data, an empty row set will be returned.

  • return: an Inx_Api_DataAccess_LinkDataRowSet object that contains the data produced by the given query.
  • access: public
Inx_Api_DataAccess_LinkDataRowSet selectByRecipient (int $iRecipient)
  • int $iRecipient: the id of the recipient.

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