You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
690 B

<?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()));
}
}
}
?>