Skip to content
Snippets Groups Projects
Commit 57aab0a7 authored by Demian Katz's avatar Demian Katz
Browse files

Automatic execution of method names starting with init in bootstrapper.

parent 1596a779
No related merge requests found
......@@ -64,10 +64,13 @@ class Bootstrap
*/
public function bootstrap()
{
$this->initAccount();
$this->initContext();
$this->initHeadTitle();
$this->initTheme();
// automatically call all methods starting with "init":
$methods = get_class_methods($this);
foreach ($methods as $method) {
if (substr($method, 0, 4) == 'init') {
$this->$method();
}
}
}
/**
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment