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 | |
namespace App\models; | |
use SimpleMVC\core\Model as Model; | |
class Patient extends Model { | |
public $id; | |
private $firstname; | |
private $lastname; | |
private $birthdate; |
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 | |
namespace App\controllers; | |
use SimpleMVC\core\Controller as Controller; | |
use App\models\Employee as Employee; | |
use SimpleMVC\core\View as View; | |
use SimpleMVC\widgets\DataTable as DataTable; | |
use SimpleMVC\core\db as db; | |
class EmployeeController extends 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 | |
namespace App\models; | |
use SimpleMVC\core\Model as Model; | |
class Employee extends Model { | |
public $id; | |
private $firstname; | |
private $lastname; | |
private $type; |
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 | |
namespace App\controllers; | |
use SimpleMVC\core\Controller as Controller; | |
use App\models\User as User; | |
use SimpleMVC\core\View as View; | |
use SimpleMVC\core\db as db; | |
class UserController extends Controller { | |
private $user; |
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 | |
namespace App\controllers; | |
use SimpleMVC\core\Controller as Controller; | |
use App\models\Client as Client; | |
use SimpleMVC\core\View as View; | |
use SimpleMVC\widgets\DataTable as DataTable; | |
use SimpleMVC\core\db as db; | |
class ClientController extends 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 | |
namespace SimpleMVC\core; | |
class DependencyResolver { | |
private static $map = []; | |
public static function set($key, $value) { | |
if (!array_key_exists($key, self::$map)) { | |
self::$map[$key] = $value; | |
} |
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 | |
namespace SimpleMVC\core; | |
class Application { | |
public function setReporting() | |
{ | |
if (DEVELOPMENT_ENVIRONMENT) { | |
error_reporting(E_ALL); | |
ini_set('display_error', 'on'); |
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 "../vendor/autoload.php"; | |
require "../config/config.php"; | |
define('DS', DIRECTORY_SEPARATOR); | |
define('ROOT', dirname(dirname(__FILE__))); | |
if (!isset($_GET['url'])) $_GET['url'] = 'site/index'; | |
$url = $_GET['url']; |
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 | |
namespace core; | |
class Application { | |
public function setReporting() | |
{ | |
if (DEVELOPMENT_ENVIRONMENT) { | |
error_reporting(E_ALL); | |
ini_set('display_error', 'on'); |
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
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<script src="https://code.jquery.com/jquery-3.7.0.min.js" integrity="sha256-2Pmvv0kuTBOenSvLm6bvfBSSHrUJ+3A7x6P5Ebd07/g=" crossorigin="anonymous"></script> | |
<link rel="stylesheet" href="<?= SITE_BASE ?>css/main.css"> | |
<link rel="stylesheet" href="//cdn.datatables.net/1.13.4/css/jquery.dataTables.min.css"> | |
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script> | |
<title>SimpleMVC</title> | |
</head> |
NewerOlder