Qoob Portfolio

The open qoob is a php mvc framework created to speed up the process of creating dynamic sites. This is the code running this website!

Qoob Portfolio

qoob/app/error.php


<?php
/**
 * portfolio error page
 *
 * @author 		andrew harrison <andrew@harrison.nu>
 * @copyright 	creative commons attribution-shareAlike 3.0 unported
 * @license 	http://creativecommons.org/licenses/by-sa/3.0/ 
 * @version 	0.2.0
 */
namespace app;
class error extends base {
	/**
	 * render
	 * display an error message. use the `debug` flag for more verbose error messages
	 *
	 * @param string $code http status code message
	 * @param int $num error code
	 * @param string $str verbose error message
	 * @param string $file file name
	 * @param string $line line number
	 * @param array $ctx context / stack trace
	 */
	function render($code, $num, $str, $file, $line, $ctx) {
		$this->qoob->load('qoob\core\view\stache');

		$content = $this->qoob->stache->render(
			'nav', 
			array(
				'domain' => $this->domain
			),
			true
		);

		if(\library::get('CONFIG.debug')==true) {
			$content .= $this->qoob->stache->render(
				'error-debug', 
				array(
					'code' => $code,
					'num' => $num,
					'str' => $str,
					'file' => $file,
					'line' => $line,
					'ctx' => print_r($ctx, true)
				),
				true
			);
		} else {
			$content .= $this->qoob->stache->render(
				'error', 
				array(
					'domain' => $this->domain,
					'code' => $code,
				),
				true
			);
		}

		$this->qoob->stache->render(
			'template', 
			array(
				'author' => \library::get('CONFIG.GENERAL.author'),
				'copyright' => \library::get('CONFIG.GENERAL.copyrightHTML'),
				'keywords' => \library::get('CONFIG.GENERAL.keywords'),
				'description' => \library::get('CONFIG.GENERAL.description'),
				'domain' => $this->domain,
				'title' => 'personal programming portfolio',
				'page' => 'error',
				'content' => $content,
				'year'=> date('Y'), 
			)
		);
	}
}

?>

Download

raw zip tar