Recommend this page to a friend! |
![]() |
Info | Documentation | ![]() |
![]() |
![]() |
Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
![]() ![]() ![]() ![]() | Total: 773 | All time: 4,389 This week: 206![]() |
Version | License | PHP version | Categories | |||
mvc-4-dummies 0.1 | GNU General Publi... | 5.4 | PHP 5, Libraries, Design Patterns |
Description | Author | |
This package is a Web development PHP MVC framework. |
|
A Simple PHP MVC Framewok
edit /routes.php
Router::get("/","HomeController","index");
in /controllers
make HomeController.php
class HomeController extends BaseController
{
public function index(){
$this->templateEngine->assign('greeting','hello world');
$this->templateEngine->display('home.tpl');
}
}
in /views/templates
make home.tpl
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>hello world</title>
</head>
<body>
<h1>{$greeting}</h1>
</body>
</html>
![]() |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() |
||||
![]() |
||||
![]() |
||||
![]() |
||||
![]() |
||||
![]() |
||||
![]() |
||||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Icon | Icon image | ||
![]() ![]() |
Example | Sample output | ||
![]() ![]() |
Lic. | Auxiliary data | ||
![]() ![]() |
Doc. | Auxiliary data | ||
![]() ![]() |
Output | Sample output |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
![]() |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
User Ratings | ||||||||||||||||||||||||||||||
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.