Weitere ähnliche Inhalte
Ähnlich wie 前后端mvc经验 - webrebuild 2011 session (20)
Kürzlich hochgeladen (20)
前后端mvc经验 - webrebuild 2011 session
- 1. MVC
Enhance front end
rank work @ youa WED team
http://t.sina.com/rank
- 12. final class YourActionController extends BaseActionController {
public function index() {
$modal = $this->load(‘yourModel.php’);
$data = $modal->getData();
$this->setView(‘test/index.tpl’, $data);
}
}
- 13. • View Controller
•
•
- 20. <?php
YourActionController extends BaseActionController {
public function register() {
$model = $this->load(‘account.model’);
$emailType = 1;
$mobileType = 2;
$type = $this->request(‘usertype’);
if ($type==$emailType) {
$model->register($username, $password, $type);
}
}
}
<?php
YourModel extends BaseModel {
const EMAIL_TYPE = 1;
const MOBILE_TYPE = 2;
public function register($username, $password, $type) {}
}
- 21. HTML Javascript
Smarty
CSS
MVC framework PHP log
Hinweis der Redaktion
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n