Beispiel #1
0
 /**
  * @return Wax_Controller_JavaScript
  */
 public static function getInstance()
 {
     if (is_null(self::$_instance)) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
Beispiel #2
0
error_reporting(E_ALL | E_STRICT);
$rootPath = '../';
include_once $rootPath . 'includes/config.php';
include_once $rootPath . 'includes/constants.php';
set_include_path(get_include_path() . PATH_SEPARATOR . LIBRARY_PATH . PATH_SEPARATOR . MODULES_PATH);
include_once 'Wax/Factory.php';
Wax_Factory::includeClass('Wax_Request');
Wax_Factory::includeClass('Wax_Response');
$requestURI = Wax_Request::getInstance()->getRequestUri();
if (strncmp($requestURI, '/@@/', 4) == 0) {
    Wax_Factory::includeClass('Wax_Controller_Icon');
    Wax_Controller_Icon::getInstance()->setIconPath(ICON_PATH)->dispatch();
} elseif (strncmp($requestURI, '/@JavaScript/', 5) == 0) {
    Wax_Factory::includeClass('Wax_Controller_JavaScript');
    Wax_Controller_JavaScript::getInstance()->setModulesPath(MODULES_PATH)->setLibraryPath(LIBRARY_PATH)->dispatch();
} elseif (strncmp($requestURI, '/~', 2) == 0) {
    Wax_Factory::includeClass('Wax_Controller_Profile');
    Wax_Controller_Profile::getInstance()->setProfileClass(array('Standard8', 'Personas_Perfil'))->dispatch();
} else {
    Wax_Factory::includeClass('Wax_Controller_Front');
    Wax_Factory::includeClass('Wax_Session');
    Wax_Factory::includeClass('Wax_Db');
    Wax_Factory::includeClass('Standard8_Config');
    Wax_Factory::includeClass('Standard8_Session');
    Wax_Factory::includeClass('Standard8_Uri');
    Wax_Session::start();
    Wax_Locale::setLocalePath(LOCALE_PATH);
    Wax_Locale::__init();
    Wax_Db::open($dbConfig);
    Standard8_Session::start();