You are here

public static function Messaging_Object::object_build in Messaging 6.4

Build object from template

1 call to Messaging_Object::object_build()
Messaging_Object::object_load in includes/messaging_object.class.inc
Load object by unique key, no static caching

File

includes/messaging_object.class.inc, line 173
Drupal Messaging Framework - Base classes

Class

Messaging_Object
Messaging persistent object

Code

public static function object_build($template, $class) {
  if (is_object($template) && is_a($template, $class)) {
    return $template;
  }
  else {

    // This seems to be the only way of invoking the build method of the class
    return call_user_func(array(
      $class,
      'build',
    ), $template);
  }
}