522 Part III: Developing E-mail Solutions EcampaignTrack() This (Web server extensions)
Monday, February 25th, 2008522 Part III: Developing E-mail Solutions EcampaignTrack() This is the constructor method that sets a member variable, track_tbl, to e-campaign configuration variable $ECAMPAIGN_TRACK_TBL, which holds the URL track table name. This method also sets another member variable, dbi, to the DBI ($dbi) object, which is passed from the application. storeTrack() This method stores a URL track record in the URL track table. Creating an Unsubscription Tracking class The purpose of this class is to provide the Unsubscription Track object, which is needed to manipulate the unsubscription track information. An implementation of this class can be found in ch15/apps/class/class.EcampaignUnsub.php. This class implements the methods discussed in the following sections. EcampaignUnsub() This is the constructor method that sets a member variable, unsub_tbl, to $ECAMPAIGN_UNSUB_TBL, which is an ecampaign.conf configuration variable set to hold the unsubscription table name. This method also sets another member variable, dbi, to the DBI ($dbi) object, which is passed from the application. storeUnsub() This method stores an unsubscription record in the unsubscription track table. Creating a Report class The purpose of this class is to provide the Report object, which is needed to manipulate the report information. An implementation of this class can be found in ch15/apps/class/class.EcampaignReport.php file in the CDROM. This class implements the methods discussed in the following sections. EcampaignReport() This constructor method sets member variables ecampaign_tbl, track_tbl, unsub_tbl, and bounced_tbl to e-campaign configuration variables $ECAMPAIGN_ TBL, $ECAMPAIGN_TRACK_TBL, $ECAMPAIGN_UNSUB_TBL, and $ECAMPAIGN_BOUNCED_ TBL, respectively. The member variable, dbi, is set to the DBI object ($dbi), which is passed as a parameter from an application. Another member variable, campaign_id, is set to the campaign ID passed as a parameter from an application creating the report object.