You are here

function Messaging_Method::set_properties in Messaging 6.4

Set multiple properties from array

Parameters

$data: Array of properties

$name1, $name2...: Names of properties to set if they're in the array

2 calls to Messaging_Method::set_properties()
Messaging_Method::__construct in includes/messaging_method.class.inc
Build send method from info array
Messaging_Send_Method::__construct in includes/messaging_method.class.inc
Build send method from info array

File

includes/messaging_method.class.inc, line 56
Drupal Messaging Framework - Send_Method class file

Class

Messaging_Method
Base class for all Incoming and Sending methods

Code

function set_properties() {
  $args = func_get_args();
  if ($data = array_shift($args)) {

    // If no parameters passed, set them all
    $properties = $args ? $args : array_keys($data);
    while ($name = array_shift($properties)) {
      if (isset($data[$name])) {
        $this->{$name} = $data[$name];
      }
    }
  }
}