symphonycms /
symphony-2
| 1 | <?php |
||
| 2 | |||
| 3 | $Page = new HTMLPage(); |
||
| 4 | |||
| 5 | $Page->Html->setElementStyle('html'); |
||
| 6 | |||
| 7 | $Page->Html->setDTD('<!DOCTYPE html>'); |
||
| 8 | $Page->Html->setAttribute('lang', 'en'); |
||
| 9 | $Page->addElementToHead(new XMLElement('meta', null, array('http-equiv' => 'Content-Type', 'content' => 'text/html; charset=UTF-8')), 0); |
||
| 10 | $Page->addStylesheetToHead(ASSETS_URL . '/css/symphony.min.css', 'screen', null, false); |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 11 | |||
| 12 | $Page->setHttpStatus($e->getHttpStatusCode()); |
||
| 13 | $Page->addHeaderToPage('Content-Type', 'text/html; charset=UTF-8'); |
||
| 14 | $Page->addHeaderToPage('Symphony-Error-Type', 'generic'); |
||
| 15 | |||
| 16 | if (isset($e->getAdditional()->header)) { |
||
| 17 | $Page->addHeaderToPage($e->getAdditional()->header); |
||
| 18 | } |
||
| 19 | |||
| 20 | $Page->setTitle(__('%1$s – %2$s', array(__('Symphony'), $e->getHeading()))); |
||
| 21 | $Page->Body->setAttribute('id', 'error'); |
||
| 22 | |||
| 23 | $div = new XMLElement('div', null, array('class' => 'frame')); |
||
| 24 | $div->appendChild(new XMLElement('h1', $e->getHeading())); |
||
| 25 | $div->appendChild( |
||
| 26 | ($e->getMessageObject() instanceof XMLElement ? $e->getMessageObject() : new XMLElement('p', trim($e->getMessage()))) |
||
|
0 ignored issues
–
show
|
|||
| 27 | ); |
||
| 28 | $Page->Body->appendChild($div); |
||
| 29 | |||
| 30 | $output = $Page->generate(); |
||
| 31 | echo $output; |
||
| 32 | |||
| 33 | exit; |
||
| 34 |