*/ class ApplicationLoader extends Loader { public function commit() { spl_autoload_register(function ($class) { if ((strpos($class, APP_NAMESPACE) !== false)&&((strpos($class,"__CG__") === false))) { /* * here we cas use include for better efficiency * because this called only once anyway */ // echo APP_DIR."\n"; $path = APP_DIR . DS . str_replace(APP_NAMESPACE . DS, "", str_replace('\\', DS, $class)) . '.php'; //echo "path: ".$path."\n\n"; include $path; } }); /* INIT APPLICATION */ $bootstrapperClass = APP_NAMESPACE . "\\" . APP_NAME . "Boot"; if (!class_exists($bootstrapperClass)) die("Invalid application bootfile (missing ". $bootstrapperClass ." class) "); //the class must be descendant of BootStrapper $bootstrapper = new $bootstrapperClass(); if (!is_a($bootstrapper, "Phem\ClassLoading\Bootstrapping\Bootstrapper")) die("Application bootstrapper must be inherited from Bootstrapper class"); $bootstrapper->init(); } } WebSVN - freenet-router - Blame - Rev 2 - /trunk/freenet-router/var/www/freenet-router/Framework/ClassLoading/ApplicationLoader.php
  jablonka.czprosek.czf

freenet-router

Subversion Repositories:
[/] [trunk/] [freenet-router/] [var/] [www/] [freenet-router/] [Framework/] [ClassLoading/] [ApplicationLoader.php] - Blame information for rev 2

 

Line No. Rev Author Line

Powered by WebSVN 2.2.1