Location: PHPKode > projects > DIY Blog > diy-blog/classes/diy-blog/frontend/view/error/ErrorView.class.php
<?php

/**
 * Server error view
 * @package diy-blog.frontend.view.error
 * @author	Martynas Jusevicius <hide@address.com>
 * @link	http://www.xml.lt
 */

class ErrorView extends FrontEndView
{
	public function __construct(Resource $resource = null)
	{
		parent::__construct($resource);

		$this->template->load(APP_VIEW_DIR."error/Error.xsl");
	}
	
	public function display(Request $request, Response $response)
	{
		$xml = "<?xml version=\"1.0\"?><Error/>";
		$this->doc->loadXML($xml);

		//$this->proc->setParameter("", "error-message", $request->getAttribute("error-message"));
		$this->proc->setParameter("", "error-message", str_replace("\"", "&quot;", $request->getAttribute("error-message")));

		parent::display($request, $response);

		$response->setStatus(Response::SC_INTERNAL_SERVER_ERROR);
	}

}
Return current item: DIY Blog