Files
majestic/classes/PageController.class.php
akulikov c6df341c68 Bid history refresh added (by ajax)/ Ajax root class added
git-svn-id: svn+ssh://code.netmonsters.ru/svn/majestic/trunk@27 4cb57b5f-5bbd-dd11-951b-001d605cbbc5
2008-12-16 12:47:17 +00:00

38 lines
861 B
PHP

<?php
/**
*
*
* @copyright
* @link
* @package Majestic
* @subpackage PageController
* @since
* @version SVN: $Id$
* @filesource $URL$
*/
final class PageController
{
/**
* Вывод в браузер всего сайта.
*
*/
public function display()
{
try {
$this->route = Load::router()->proccess(MJ_PATH);
$action = new $this->route->action;
$decorator = new $this->route->decorator;
return $decorator->display($action);
} catch (MJException $e) {
return $e->terminate();
} catch (Exception $e) {
$decorator_name = DEFAULT_DECORATOR;
$action_name = DEFAULT_ACTION;
$decorator = new $decorator_name;
return $decorator->display(new $action_name($e->getMessage()));
}
}
}
?>