You are here

function _variable_realm_controller in Variable 7.2

Same name and namespace in other branches
  1. 7 variable_realm/variable_realm.module \_variable_realm_controller()

Create realm controller object.

This may be invoked really early in the bootstrap so it needs to be safe enough for module updates and check whether the class really exists. It returns FALSE if not.

1 call to _variable_realm_controller()
variable_realm_controller in variable_realm/variable_realm.module
Get variable realm controller or create it if not defined.

File

variable_realm/variable_realm.module, line 547
Variable API module - Realms

Code

function _variable_realm_controller($realm_name) {
  $info = variable_realm_info($realm_name);
  $class = !empty($info['controller class']) ? $info['controller class'] : 'VariableRealmDefaultController';
  return class_exists($class) ? new $class($realm_name) : FALSE;
}