/** * Remove Command * * Remove a previously <b>registerCommand() registered</b> <b>ICommand</b> to <b>INotification</b> mapping. * * @param string $notificationName Name of the <b>INotification</b> to remove the <b>ICommand</b> mapping for. * @return void */ public function removeCommand($notificationName) { // if the Command is registered... if ($this->hasCommand($notificationName)) { // remove the observer $this->view->removeObserver($notificationName, $this); // remove the command unset($this->commandMap[$notificationName]); } }
public function render(IView $v, DateTimeView $dtv, NavigationView $nav, $message) { echo '<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Login Example</title> </head> <body> <h1>Assignment 4</h1> ' . $this->renderIsLoggedIn($nav) . ' <div class="container"> ' . $v->response($message) . ' ' . $dtv->show() . ' </div> </body> </html> '; }
public function OnError(IView $view, $code) { // anexa evento /*$urlDestin = Globals::get('http/url'); $destination = Globals::get('http/controllers/destination'); $resultEvents = Events::Attach('error[404]',array('urlDestin'=>$urlDestin,'destination'=>$destination)); */ $error_control = Globals::get("path/controller/path") . '_error/' . $code . '/' . ucfirst($code) . '_control.php'; if (!file_exists($error_control)) { return false; } $error_model = Globals::get("path/controller/path") . '_error/' . $code . '/' . ucfirst($code) . '_model.php'; $error_view = Globals::get("path/controller/path") . '_error/' . $code . '/' . ucfirst($code) . '_view.php'; $controlName = '_' . ucfirst($code) . '_control'; if (file_exists($error_model)) { // carrega o model do modulo require_once $error_model; } // carrega o control do modulo require_once $error_control; // instancia o control $control = new $controlName(); // carrega o action $resultAction = $this->LoadActionOnError($control); // envia o retorn da action como parametro, para a View if ($resultAction != null) { $resultView = $view->mount($resultAction, $error_view); if ($resultView == true) { } } exit; }
private function renderJSON(IView $view) { $compiled = $this->json($view->model()); echo $compiled; }