/** * Returns an instance of itself * * @return TlalokesRegistry */ public static function instance() { if (self::$_instance == null) { self::$_instance = new TlalokesRegistry(); } return self::$_instance; }
// set paths from index $c['path']['tlalokes'] = $tlalokes; $c['path']['app'] = $app; $c['path']['uri'] = $uri; if (isset($files)) { $c['path']['files'] = $files; unset($files); } // load core functions require 'functions/tlalokes_core.php'; require 'functions/tlalokes_strings.php'; require 'functions/tlalokes_parsers.php'; require 'functions/tlalokes_filesystem.php'; // load basic classes require 'classes/TlalokesRegistry.php'; $r = TlalokesRegistry::instance(); $r->conf = tlalokes_core_conf_load($c); // check if execution is needed tlalokes_core_execution($r, $c); unset($c); unset($uri); unset($app); unset($tlalokes); // look up for controller $path = $r->conf['path']['app'] . $r->conf['path']['controllers']; if (!file_exists($path . $r->conf['current']['controller'] . '.php')) { if (!class_exists($r->conf['current']['controller'], false)) { $msg = 'Receiver: Class ' . $r->conf['current']['controller'] . ' not found.'; tlalokes_error_msg($msg); } }