示例#1
0
require_once 'exception/ExceptionDALAuthentication.php';
require_once 'exception/FailedLoginWithoutAnyEnteredFieldsException.php';
require_once 'exception/FailedLoginWithOnlyUserNameException.php';
require_once 'exception/FailedLoginWithOnlyPasswordException.php';
require_once 'exception/FailedLoginWithWrongPassWordButExistingUserNameException.php';
require_once 'exception/FailedLoginWrongNameInCookiesException.php';
//CREATE OBJECTS OF THE MODELS
$timeStamp = new \model\DateTimeModel();
$loginModel = new \model\LoginModel();
$smartQuestionsModel = new \model\SmartQuestionsModel();
$dalauthenticationModel = new \model\DALAuthentication();
//CREATE OBJECTS OF THE VIEWS
$loginView = new \view\LoginView($loginModel);
$dateTimeView = new \view\DateTimeView($timeStamp);
$layoutView = new \view\LayoutView();
$smartQuestionsView = new \view\SmartQuestionsView($smartQuestionsModel);
//CREATE OBJECTS OF THE CONTROLLERS
$doAuth = new \controller\doAuth($loginView, $loginModel, $smartQuestionsView, $smartQuestionsModel, $dalauthenticationModel);
$doAuth->tryAuth();
$layoutView->render($loginModel->getIsAuthenticated(), $loginView, $dateTimeView);
//var_dump($_SESSION);
//TODO > START
//assert
//(
//    false,
//    "Not Yet implemented! " .
//    "//TODO " .
//    "?" .
//    " in the Class: ".  __CLASS__ . " and the line " .  __LINE__
//);
//TODO < END