Class ConsumerHelper

Description

This class provides extended methods for manipulating Consumer Settings.

ConsumerService
   |
   --ConsumerHelper
Method Summary
void activateConsumer ( $cid)
boolean addConsumerConfig (String $domain, Array $values)
void deactivateConsumer ( $cid)
boolean duplicateConsumerValues ( $domain,  $newDomain)
void getAllConsumer ()
boolean isConsumerExisting ()
boolean removeConsumerByDomain (Stringt $name)
boolean removeConsumerByID (int $cid)
void setConsumerValues ( $cid,  $newKey,  $value)
void setDefaultConsumer ( $domain)
Methods
activateConsumer (line 90)

Activates all Consumer Mappings for the given Consumer ID.

void activateConsumer ( $cid)
  • $cid
addConsumerConfig (line 72)

Sets an Array of Consumer Config Entrys and saves it afterwards.

Returns TRUE on success otherwise FALSE.

ATTENTION: Each entry that is empty will be removed! If you want to remove one of the Consumer Config Entrys, simply use

  1. addConsumerConfig($domainarray('foo' => ''))
.

  • return: TRUE on success, otherwise FALSE
boolean addConsumerConfig (String $domain, Array $values)
  • String $domain: the Domain Name
  • Array $values: the Values to set
deactivateConsumer (line 98)

Deactivates all Consumer Mappings for the given Consumer ID.

void deactivateConsumer ( $cid)
  • $cid
duplicateConsumerValues (line 125)

Copies all Key-Value pairs from $domain to $newDomain.

  • return: true on success, otherwise false
boolean duplicateConsumerValues ( $domain,  $newDomain)
  • $domain
  • $newDomain
getAllConsumer (line 240)

Get an associative Array with all existing Consumer.

Arrays key is Consumer ID and value the

.

void getAllConsumer ()
getAllConsumerIDs (line 187)

Returns all currently existing Consumer IDs within the System.

If none is installed an empty array is returned!

  • return: all IDs as array
array getAllConsumerIDs ()
getAllConsumerNames (line 214)

Returns all currently existing Consumer Names within the System.

If none is installed an empty array is returned!

  • return: all Consumer Names as array
array getAllConsumerNames ()
getConsumerByID (line 260)

Returns an Consumer by its ID. If the Consumer does not exist it returns null.

  • return: the Consumer or null
Consumer getConsumerByID ( $id)
  • $id
getDefaultConsumer (line 50)
  • see: getConsumerByName(DEFAULT_COMMUNITY)
void getDefaultConsumer ()
isConsumerExisting (line 203)

This function checks if there is a Consumer existing wihtin the System.

  • return: TRUE if there is at least one Consumer, otherwise FALSE
boolean isConsumerExisting ()
removeConsumerByDomain (line 168)

Removes a complete Consumer from the Configuration.

You have to submit the Domain Name!

  • return: TRUE on success, otherwise FALSE
boolean removeConsumerByDomain (Stringt $name)
  • Stringt $name: the Consumers Domain to remove
removeConsumerByID (line 143)

Removes a complete Consumer from the Configuration.

You have to submit a Consumer ID!

  • return: TRUE on success, otherwise FALSE
boolean removeConsumerByID (int $cid)
  • int $cid: the Consumer ID
removeDefaultConsumer (line 55)
void removeDefaultConsumer ()
setConsumerValues (line 106)

Sets the Key-Value pair for all Consumers matching the given CID.

void setConsumerValues ( $cid,  $newKey,  $value)
  • $cid
  • $newKey
  • $value
setDefaultConsumer (line 42)

This function sets the given Community as Default.

void setDefaultConsumer ( $domain)
  • $domain

Inherited Methods

Inherited From ConsumerService

ConsumerService::findConsumerID()
ConsumerService::getConsumerByName()
ConsumerService::getConsumerConfigEntry()
ConsumerService::getConsumerIdForDomain()
ConsumerService::getNamesForID()
ConsumerService::loadConsumerConfiguration()

Documentation generated by phpDocumentor 1.3.1