The Code - The Controller

Example 1.7. Controller.inc.php
<?php
/**
 * Description of 
 * File: Controller.inc.php
 *
 * @author nml
 * @version 2015-11-26, V0.9
 */

require_once 'models/Model.inc.php';
require_once 'models/Authentication.inc.php';
require_once 'models/NewsItem.inc.php';
require_once 'views/ViewEmpty.inc.php';
require_once 'views/ViewItem.inc.php';
require_once 'views/ViewItems.inc.php';
require_once 'views/ViewItemForm.inc.php';
require_once 'views/ViewLogin.inc.php';

class Controller {
    private $model;
    private $view;
    
    public function __construct() {
        $this->model = new Model();
    }
    
    public function invoke() {
        $itid = filter_input(INPUT_GET, 'itid');
        $func = filter_input(INPUT_GET, 'func');
        
        if (isset($func) && $func == "login") {
            $this->view = new ViewLogin($this->model);
            $this->view->setTitle('News - Login');
            
        } elseif (isset($func) && $func == "loginattempt") {
            if (!Authentication::isAuthenticated() 
                  && Authentication::areCookiesEnabled()
                  && isset($_POST['user']) 
                  && isset($_POST['pwd'])) {
                $auth = Authentication::authenticate($_POST['user'], $_POST['pwd']);
            }
            if (!Authentication::isAuthenticated())
                header("Location: ./index.php?func=login&err=loginerr"); 
            else
                header("Location: ./index.php?ok");  // authenticated
            
        } elseif (isset($func) && $func == "logout") {
            Authentication::logout();
            header("Location: ./index.php");
                       
        } elseif (isset($func) 
                && $func == "newitemform" 
                && Authentication::isAuthenticated()) {
            $this->view = new ViewItemForm($this->model);
            $this->view->setTitle('News - Write News Item');
            
        } elseif (isset($func) 
                && $func == "i2db" 
                && Authentication::isAuthenticated()) {
            NewsItem::create();
            header('Location: index.php');
            
        } elseif (isset($func) && $func == "") {
            $this->view = new ViewEmpty($this->model);
            $this->view->setTitle('News - Login');
            
        } elseif (isset($itid) && $itid != "") {
            NewsItem::getNewsItem($itid, $this->model);
            $this->view = new ViewItem($this->model);
            $this->view->setTitle('News - One Item');
            
        } else {
            $this->model->setItemsArr(NewsItem::itemFactory($this->model));
            $this->view = new ViewItems($this->model);
            $this->view->setTitle('News - List');
        }   
        print($this->view->printPage());

    }
}