vtr / mvc
A simple php framework mvc
Installs: 23
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/vtr/mvc
Requires
- php: >=5.5
 - vtr/html-helpr: v1.*
 - vtr/orm: v1.*
 
This package is not auto-updated.
Last update: 2025-10-26 01:28:32 UTC
README
- A simple PHP MVC Framework
 - PHP >= 5.5
 
Updates
VTRMVC 1.0 is CLOSE! Why ? I'm working with VTRMVC 2.0. We publish our new version soon.
How to use ?
It's simple:
First, use composer...
... "require" { "vtr/mvc" : "dev-master" }
$ composer install
Define a JSON configuration file for your application. (Take a look on file "start_sample.json"). But be attention to principal nodes:
{
  ...
  "site_path" : ".",
  "tmp_path" : "./tmp",
  "log_path" : "./tmp/log",
  "mvc" : {
    "path" : "../app",
    ...
  }
  ...
}
Define a tree folder, where you will put your MVC Code, must be:
App Folder/
|
├── Controller/        # Controllers folder
|   ├── AppController.php
|   └── HomeController.php
├── Model/             # Models folder
|   ├── AppModel.php
|   └── HomeModel.php
└── View/              # Views folder
    └── Home/
        └── index.php   
After this, you can call the application:
<?php include "../vendor/autoload.php"; // Composer file try{ $url = isset($_GET["_url"]) ? $_GET["_url"] : ""; // URL passing by .htaccess $app = new VTRMVC\Core\App(); $app->start("../public/app.json", $url); }catch (Exception $ex) { VTRMVC\Util\Util::varzx($ex->getMessage()); }
Do you need a sample ?
Please take a good look on "Sample" folder. You'll see how simple it is to do.