class PureFunctions in X Autoload 7.5
Hierarchy
- class \Drupal\xautoload\Tests\VirtualDrupal\PureFunctions
Expanded class hierarchy of PureFunctions
2 files declare their use of PureFunctions
- AbstractExampleModules.php in tests/
src/ Example/ AbstractExampleModules.php - MockDrupalSystem.php in tests/
src/ Mock/ MockDrupalSystem.php
File
- tests/
src/ VirtualDrupal/ PureFunctions.php, line 7
Namespace
Drupal\xautoload\Tests\VirtualDrupalView source
class PureFunctions {
/**
* @see module_invoke()
*
* @param string $module
* @param string $hook
*
* @return mixed|null
*
* @todo Do this in a injectable object instead?
* @see HookSystem::moduleInvoke()
*/
static function moduleInvoke($module, $hook) {
$args = func_get_args();
assert($module === array_shift($args));
assert($hook === array_shift($args));
$function = $module . '_' . $hook;
if (function_exists($function)) {
return call_user_func_array($function, $args);
}
return NULL;
}
/**
* @see bootstrap_hooks()
*
* @return string[]
*/
static function bootstrapHooks() {
return array(
'boot',
'exit',
'watchdog',
'language_init',
);
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PureFunctions:: |
static | function | ||
PureFunctions:: |
static | function | @todo Do this in a injectable object instead? |