<?php
        if ($_SERVER['REQUEST_METHOD'] == 'POST') {
            $registerStudentForm->fillDataFromArray($_POST);

            $errors = $this->validations->validRegisterStudentForm($registerStudentForm);

            if (!$errors->hasErrors()) {
                $student = $registerStudentForm->getStudent();

                $student->setPassword($registerStudentForm->getPassword());

                $this->studentGateway->addStudent($student);

                $this->registrationHelper->redirect($_GET['go']);
            }
        }

