From 068287ec3527d22591345560f97fd10ef9374348 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Mon, 31 Mar 2014 00:16:37 -0400 Subject: [PATCH] RootControllerDelegate is no longer a WeakInterface. --- admin/index.php | 21 ++++++++++++--------- includes/hoplite | 2 +- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/admin/index.php b/admin/index.php index 3aef8bb..dda4edc 100644 --- a/admin/index.php +++ b/admin/index.php @@ -37,10 +37,7 @@ require_once HOPLITE_ROOT . '/views/template_loader.php'; require_once BUGDAR_ROOT . '/admin/login.php'; -/** - * @implements \hoplite\http\RootControllerDelegate - */ -class FrontController +class FrontController implements http\RootControllerDelegate { /** @var \hoplite\http\RootController */ private $controller = NULL; @@ -50,6 +47,13 @@ class FrontController $this->controller = $controller; } + public function LoginPage() + { + $this->controller->InvokeAction(new LoginAction($this->controller)); + } + + // RootControllerDelegate: + public function OnInitialRequest(http\Request $request, http\Response $response) { $response->data['language'] = fetch_user_language(); @@ -78,11 +82,6 @@ class FrontController $this->LoginPage(); } - public function LoginPage() - { - $this->controller->InvokeAction(new LoginAction($this->controller)); - } - public function WillInvokeAction(http\Action $action, http\Request $request, http\Response $response) { $templates = array('admin_header', 'admin_footer'); @@ -90,6 +89,10 @@ class FrontController $templates = array_merge($templates, $action->TemplateSet()); views\TemplateLoader::GetInstance()->PreCache($templates); } + + public function DidInvokeAction(http\Action $action, http\Request $request, http\Response $response) {} + + public function WillStop(http\Request $request, http\Response $response) {} } // Actions can implement this interface to have their required templates loaded diff --git a/includes/hoplite b/includes/hoplite index 78804a1..dc08cff 160000 --- a/includes/hoplite +++ b/includes/hoplite @@ -1 +1 @@ -Subproject commit 78804a1dc21baf4763116e17c4440501fe79a6bc +Subproject commit dc08cff4b89d90466ebc2b3f2a8dc38b611558ab -- 2.43.5