Ejemplo n.º 1
0
 public function __construct()
 {
     $this->config = OsuMirror_Config::getInstance();
     $this->encryption = OsuMirror_Encryption::getInstance();
     $this->route = OsuMirror_Route::getInstance();
     $this->_viewScript = APPLICATION_PATH . '/views/' . $this->route->getRoute()->controller . '/' . $this->route->getRoute()->action . '.phtml';
     $this->_headers = array();
     parent::__construct(array(), ArrayObject::ARRAY_AS_PROPS);
 }
 public function call(OsuMirror_Route $route = null)
 {
     $this->_route = $route;
     if (null === $route) {
         $this->_route = OsuMirror_Route::getInstance();
     }
     $actionName = $this->_route->getRoute()->action . 'Action';
     if (is_callable(array($this, $actionName))) {
         $this->{$actionName}();
     } elseif (is_callable(array($this, 'indexAction'))) {
         $this->indexAction();
     } else {
         throw new Exception('Your call to ' . get_class($this) . '::' . $actionName . ' could not be handled!');
     }
     $this->view->dispatch();
 }
Ejemplo n.º 3
0
<?php

ini_set('display_errors', true);
error_reporting(E_ALL & ~E_NOTICE);
date_default_timezone_set('Europe/Berlin');
define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/..'));
require_once APPLICATION_PATH . '/library/AutoLoader.php';
OsuMirror_AutoLoader::getInstance()->registerAutoLoader();
OsuMirror_ErrorHandler::getInstance();
$route = OsuMirror_Route::getInstance();
$route->run();