now right

git-svn-id: svn+ssh://code.netmonsters.ru/svn/majestic/trunk@4 4cb57b5f-5bbd-dd11-951b-001d605cbbc5
This commit is contained in:
akulikov
2008-12-02 09:03:33 +00:00
parent f985cdaaf3
commit bbc1bf5c21
12 changed files with 912 additions and 0 deletions

27
PageController.class.php Normal file
View File

@ -0,0 +1,27 @@
<?php
final class PageController
{
/**
* Вывод в браузер всего сайта.
*
*/
public function display()
{
try {
$this->route = Load::router()->proccess(MJ_PATH);
$decorator = new $this->route->decorator;
return $decorator->display(new $this->route->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()));
}
}
}
?>