* "appname". * * @author Thomas Urban * */ try { include 'rewritten.php'; // get application actually requested $application = txf::getContext()->application; // get script of application actually requested $script = path::glue($application->pathname, $application->script); // change to that folder for supporting homogenic use of relative pathnames chdir(dirname($script)); // include selected script include_once $script; // due to disabled shutdown handler we are required to call related handler manually view::current()->onShutdown(); } catch (http_exception $e) { header($e->getResponse()); view::variable('exception', $e); view::addBodyClass('exception'); view::addBodyClass('http-exception'); $data = variable_space::create('reason', $e); try { view::main(view::engine()->render('error/' . $e->getCode(), $data)); } catch (\UnexpectedValueException $dummy) { view::main(view::engine()->render('error/generic', $data)); } view::variable('title', $e->getStatus()); view::current()->onShutdown(); }
public static function __callStatic($method, $arguments) { return view::render('markup/' . $method, variable_space::create('arguments', $arguments, 'text', array_shift($arguments))); }