if ($this->request->http_method == 'PUT')
parse_str(file_get_contents('php://input'), $this->request->data['_POST']);
+ // Register self as the active instance.
+ $GLOBALS[__CLASS__] = $this;
+
$this->delegate->OnInitialRequest($this->request, $this->response);
// Dispatch the request to an Action.
require_once HOPLITE_ROOT . '/base/filter.php';
-/*
+/*!
Renders a template with additional vars.
@param string The template name to render
@param array Variables with which to render.
echo TemplateLoader::Fetch($name)->Render($vars);
}
+/*! @brief Creates a URL via RootController::MakeURL().
+ This requires the root controller be set in the $GLOBALS as
+ hoplite\http\RootController.
+ @param string Path.
+*/
+function MakeURL($path)
+{
+ return $GLOBALS['hoplite\http\RootController']->MakeURL($path, FALSE);
+}
+
/*!
A Template is initialized with a text file (typically HTML) and can render it
with data from some model. It has a short macro expansion system, equivalent