Importer for subscribers

package org.openpsa.directmarketing

 Methods

__construct (array $schemadbs, array $settings)

Parameters

$schemadbs

arrayThe datamanager schemadbs to work on

$settings

arrayImporter configuration, if any

import_subscribers (array $subscribers, \org_openpsa_directmarketing_campaign_dba $campaign)

Takes an array of new subscribers and processes each of them using datamanager2.

Parameters

$subscribers

arrayThe subscribers to import

$campaign

\org_openpsa_directmarketing_campaign_dbaThe campaign to import into

Returns

arrayImport status

parse (mixed $input)

Converts input into the importer array format

Parameters

$input

mixed

Returns

array

_clean_new_objects ()

Clean the new objects

_datamanager_process (String $type, array $subscriber, \midcom_core_dbaobject $object)

Process the datamanager

Parameters

$type

StringSubscription type

$subscriber

array

$object

\midcom_core_dbaobject

_import_subscribers_campaign_member (array $subscriber, \org_openpsa_contacts_person_dba $person, \org_openpsa_directmarketing_campaign_dba $campaign)

Parameters

$subscriber

$person

$campaign

_import_subscribers_organization (array $subscriber)

Parameters

$subscriber

_import_subscribers_organization_member (array $subscriber, \org_openpsa_contacts_person_dba $person, \org_openpsa_contacts_group_dba $organization)

Parameters

$subscriber

$person

$organization

_import_subscribers_person (array $subscriber)

Parameters

$subscriber

 Properties

 

array $_schemadbs

The schema databases used for importing to various objects like persons and organizations
 

array $_settings

Importer configuration, if any
 

array $_datamanagers

Datamanagers used for saving various objects like persons and organizations
 

array $_import_status

Status table
 

array $_new_objects

Object registry