Class midcom_org_openpsa_campaign

Description

MidCOM DBA wrapped access to org_openpsa_campaign object, with some utility methods

Located in /org.openpsa.directmarketing/campaign.php (line 5)

__midcom_org_openpsa_campaign
   |
   --midcom_org_openpsa_campaign
Direct descendents
Class Description
 class org_openpsa_directmarketing_campaign Another wrap level
Variable Summary
 mixed $rules
 mixed $testers
Method Summary
 midcom_org_openpsa_campaign midcom_org_openpsa_campaign ([mixed $id = null])
 void schedule_update_smart_campaign_members ([mixed $time = false])
 void tester_diff (mixed $arr1, mixed $arr2)
 string _fix_serialization ([string $data = null])
 void _get_testers ()
 void _get_tester_by_personid (mixed $id)
 void _on_creating ()
 void _on_loaded ()
 void _on_updated ()
 void _on_updating ()
 void _update_testers ()
Variables
mixed $rules = array() (line 8)
mixed $testers = array() (line 7)
Methods
Constructor midcom_org_openpsa_campaign (line 10)
midcom_org_openpsa_campaign midcom_org_openpsa_campaign ([mixed $id = null])
members_update_status (line 382)

Checks the parameters related to members update and returns string describing status or false if this is not a smart campaign.

For example:

  • Running (started on yyyy-mm-dd H:i)
  • Last run on yyyy-mm-dd H:i
  • Last run on --, next scheduled run on --
  • Last run failed on --, last succesfull run on --

void members_update_status ()
schedule_update_smart_campaign_members (line 339)

Schedules a background memberships update for a smart campaign

void schedule_update_smart_campaign_members ([mixed $time = false])
tester_diff (line 131)

Utility for diffing associative arrays

void tester_diff (mixed $arr1, mixed $arr2)
update_smart_campaign_members (line 212)

Creates/Removes members for this smart campaign based on the rules array

NOTE: This is highly resource intensive for large campaigns

void update_smart_campaign_members ()
_fix_serialization (line 202)

Fixes newline etc encoding issues in serialized data

  • return: with serializations fixed.
string _fix_serialization ([string $data = null])
  • string $data: The data to fix.
_get_testers (line 57)

Populates the testers array from memberships

void _get_testers ()
_get_tester_by_personid (line 149)

Returns org_openpsa_directmarketing_campaign_member object based on the person ID

void _get_tester_by_personid (mixed $id)
_on_creating (line 42)
void _on_creating ()
_on_loaded (line 31)
void _on_loaded ()
_on_updated (line 21)
void _on_updated ()
_on_updating (line 48)
void _on_updating ()
_serialize_rules (line 191)

Serializes rules to rulesSerialized

void _serialize_rules ()
_unserialize_rules (line 169)

Unserializes rulesSerialized to rules

void _unserialize_rules ()
_update_testers (line 86)

Updates the database according to the testers array

void _update_testers ()

Documentation generated on Tue, 15 Aug 2006 12:22:27 +0300 by phpDocumentor 1.3.0RC3