backup_migrate_crud_type_load

  1. drupal
    1. 6 crud.inc function
    2. 7 crud.inc function
Drupal 7 backup_migrate_crud_type_load($type)

Get a generic object of the given type to be used for static-like functions.

I'm not using actual static method calls since they don't work on variables prior to PHP 5.3.0

9 calls to backup_migrate_crud_type_load()

File

sites/all/modules/backup_migrate/includes/crud.inc, line 38
CRUD functions for backup and migrate types (schedules, profiles etc.).

Code

function backup_migrate_crud_type_load($type) {
  $out = NULL;
  $types = backup_migrate_crud_types();
  if (!empty($types[$type])) {
    $info = $types[$type];
    if ($info['include']) {
      backup_migrate_include($info['include']);
    }
    $out = new $info['class'];
  }
  return $out;
}