Example #1
0
 /**
  * SPL Autoload
  *
  * @param string $class_name The class to load
  */
 public static function autoload($class_name)
 {
     $libraryPath = self::LIBRARY_DIR;
     $filePath = str_replace("_", DIRECTORY_SEPARATOR, $class_name) . ".php";
     if (file_exists($libraryPath . $filePath)) {
         require_once $libraryPath . $filePath;
         return;
     }
     $baseDir = Zend_Registry::get("baseDir");
     $file = $baseDir . "/application/" . str_replace("_", DIRECTORY_SEPARATOR, $class_name) . ".php";
     if (file_exists($file)) {
         require_once $file;
     } else {
         ob_start();
         var_dump(debug_backtrace());
         $back = ob_get_clean();
         Gecko_Utils::Error("Attempted to Load a un-existant class ({$class_name})\n{$back}", "Internal Server Error");
     }
 }
Example #2
0
 /**
  * Returns a unique link to the current page, rewriting
  * current controller and action and generating a valid
  * XHTML string to print out in a HTML page
  *
  * @access public static
  * @return void
  **/
 public static function PHP_SELF()
 {
     return Gecko_Utils::genSURI();
 }
Example #3
0
 /**
  * Saves a message in the session Buffer for later retreival
  *
  * @param string $msg
  * @param string $debug
  * @return void
  */
 public static function saveMsg($msg, $debug = "")
 {
     $msg = str_replace("\n", "\\n", $msg);
     $_SESSION['GeckoSpMsg'] = $msg;
     if (!empty($debug)) {
         Gecko_Utils::Log($debug);
     }
 }