This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Db { | |
protected $dbName = 'learning_dollars_db'; /** Database Name */ | |
protected $dbHost = 'localhost'; /** Database Host */ | |
protected $dbUser = 'root'; /** Database Root */ | |
protected $dbPass = ''; /** Databse Password */ | |
protected $dbHandler, $dbStmt; | |
/** | |
* @param null|void |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Db { | |
protected $dbName = 'learning_dollars_db'; /** Database Name */ | |
protected $dbHost = 'localhost'; /** Database Host */ | |
protected $dbUser = 'root'; /** Database Root */ | |
protected $dbPass = ''; /** Databse Password */ | |
protected $dbHandler, $dbStmt; | |
/** | |
* @param null|void |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once(__dir__ . '/Db.php'); | |
class LoginModel extends Db { | |
/** | |
* @param string | |
* @return array | |
* @desc Returns a user record based on the method parameter.... | |
**/ | |
public function fetchEmail(string $email) :array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once(__dir__ . '/Db.php'); | |
class RegisterModel extends Db { | |
/** | |
* @param array | |
* @return array | |
* @desc Creates and returns a user record.... | |
**/ | |
public function createUser(array $user) :array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once(__dir__ . '/Db.php'); | |
class DashboardModel extends Db { | |
/** | |
* @param null | |
* @return array | |
* @desc Returns an array of news.... | |
**/ | |
public function fetchNews() :array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
class Controller { } | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once(__dir__ . '/Controller.php'); | |
require_once('./Model/DashboardModel.php'); | |
class Dashboard extends Controller { | |
public $active = 'dashboard'; //for highlighting the active link... | |
private $dashboardModel; | |
/** | |
* @param null|void |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once(__dir__ . '/Controller.php'); | |
require_once('./Model/LoginModel.php'); | |
class Login extends Controller { | |
public $active = 'login'; //for highlighting the active link... | |
private $loginModel; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once(__dir__ . '/Controller.php'); | |
require_once('./Model/RegisterModel.php'); | |
class Register extends Controller { | |
public $active = 'Register'; //for highlighting the active link... | |
private $registerModel; | |
/** | |
* @param null|void |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once(__dir__ . '/Controller.php'); | |
class Logout extends Controller { | |
/** | |
* @param null|void | |
* @return null|void | |
* @desc Destroys the application session and redirects to the login page... | |
**/ |
OlderNewer