Beispiel #1
0
 /**
  * Singleton instance
  *
  * @return Zood_Controller_Front
  */
 public static function getInstance()
 {
     if (null === self::$_instance) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
Beispiel #2
0
 * Register auto load
 */
Zood_Loader::registerAutoload();
//require_once 'Zend/Registry.php';
//require_once 'Zood/Util.php';
//require_once 'Zood/Controller/Front.php';
/**
 * Set default configuration dir
 */
//Zood_Loader::loadClass('Zood_Config');
//Zood_Config::addConfigDirectory(ZOODPP_ROOT . '/app' . '/config');
//Access authentication
require_once ZOODPP_ROOT . '/app/lib/access/ActionAccessInterceptor.php';
Zood_Controller_Action::addInterceptor(new ActionAccessInterceptor(), 'access');
/**
 * Get front controller instance, set controller dir and dispatch
 */
try {
    Zood_Controller_Front::getInstance()->setBaseUrl()->setControllerDirectory(ZOODPP_APP . '/controllers')->dispatch();
} catch (Exception $e) {
    Zood_Util::print_r($e->getMessage(), 'Exception!');
}
/**
 * Execution end time
 * @var Float
 */
$endTime = microtime(true);
Zood_Util::print_r($endTime - $bootTime, 'Full execution time(sec)');
Zood_Util::print_r(memory_get_usage(), 'memory_get_usage');
Zood_Util::print_r($rf = get_required_files(), 'All included files (' . count($rf) . ')');
// End ^ LF ^ UTF-8