├── .gitignore ├── .htaccess ├── App ├── Config │ └── Config.php ├── Controllers │ ├── Error.php │ └── Home.php ├── Libs │ └── .gitkeep ├── Model │ └── .gitkeep └── Views │ ├── error │ └── 404.php │ ├── home │ ├── example.php │ ├── example_with_args.php │ └── index.php │ └── templates │ ├── footer.php │ └── header.php ├── Core ├── Model.php ├── Router.php ├── Util.php └── View.php ├── README.md ├── composer.json └── public ├── .htaccess ├── css ├── bootstrap.min.css └── style.css ├── img └── .gitkeep ├── index.php └── js ├── bootstrap.bundle.min.js └── jquery-3.5.1.slim.min.js /.gitignore: -------------------------------------------------------------------------------- 1 | #------------------------- 2 | # Composer 3 | #------------------------- 4 | vendor/ 5 | composer.lock -------------------------------------------------------------------------------- /.htaccess: -------------------------------------------------------------------------------- 1 | # This file is - if you set up MINI correctly - not needed. 2 | # But, for fallback reasons (if you don't route your vhost to /public), it will stay here. 3 | RewriteEngine on 4 | RewriteRule ^(.*) public/$1 [L] 5 | -------------------------------------------------------------------------------- /App/Config/Config.php: -------------------------------------------------------------------------------- 1 | 'Home']; 13 | View::render($views, $args); 14 | } 15 | 16 | public function example() 17 | { 18 | $views = ['home/example']; 19 | $args = ['title' => 'Home | Example']; 20 | View::render($views, $args); 21 | } 22 | 23 | public function exampleWithArgs($id = null) 24 | { 25 | $views = ['home/example_with_args']; 26 | $args = [ 27 | 'title' => 'Home | Example', 28 | 'id' => $id ?? 'No se envio ID' 29 | ]; 30 | View::render($views, $args); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /App/Libs/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rjsalas91/mvc-php/acf569cec17f311cd52a0aaed08036baad001769/App/Libs/.gitkeep -------------------------------------------------------------------------------- /App/Model/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rjsalas91/mvc-php/acf569cec17f311cd52a0aaed08036baad001769/App/Model/.gitkeep -------------------------------------------------------------------------------- /App/Views/error/404.php: -------------------------------------------------------------------------------- 1 |