* @return void
*/
public final function entryPoint () {
- // Get default command
- $defaultCommand = $this->getConfigInstance()->readConfig("default_command");
-
// Create a new request object
$requestInstance = HttpRequest::createHttpRequest();
// ... and a new response object
$responseInstance = HttpResponse::createHttpResponse($this);
+ // Get default command
+ $defaultCommand = $this->getConfigInstance()->readConfig("default_command");
+
+ // Get a resolver
+ $resolverInstance = WebControllerResolver::createWebControllerResolver($defaultCommand, $this);
+
// Get a new controller instance as well
- $controllerInstance = WebControllerResolver::createWebControllerResolver($defaultCommand, $this)->resolveDefaultController();
+ $controllerInstance = $resolverInstance->resolveDefaultController();
// Handle the request
$controllerInstance->handleRequest($requestInstance, $responseInstance);
* @throws ResponseHeadersAlreadySentException Thrown if headers are
* already sent
*/
- public function flushResponse ($force=false) {
+ public function flushBuffer ($force=false) {
if ((headers_sent()) && (!$force)) {
// Headers are already sent!
throw new ResponseHeadersAlreadySentException($this, self::EXCEPTION_HEADERS_ALREADY_SENT);