Skip to content

Commit 93cd871

Browse files
committed
The version of the php-mvc package has been updated. Small improvements.
1 parent 71c14ba commit 93cd871

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
}
1212
],
1313
"require": {
14-
"php-mvc-project/php-mvc": "^1.1.1",
14+
"php-mvc-project/php-mvc": "^1.2",
1515
"components/jquery": "3.3.1",
1616
"twbs/bootstrap": "4.1.1"
1717
}

controllers/AccountController.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class AccountController extends Controller {
1717

1818
public function __construct() {
1919
// set model type for actions
20-
Model::use(array('index', 'login'), 'Login');
20+
Model::set(array('index', 'login'), 'Login');
2121

2222
// required fields
2323
Model::required('Login', 'username');

index.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
// AppBuilder::useCache(new PhpMvc\FileCacheProvider());
4848

4949
// custom handlers
50-
AppBuilder::use(function(PhpMvc\AppContext $appContext) {
50+
AppBuilder::useAppContext(function(PhpMvc\AppContext $appContext) {
5151
/*
5252
// pre-init application handler
5353
$appContext->addPreInit(function(PhpMvc\ActionContext $actionContext) {

views/shared/_layout.php

+6-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,12 @@
4646

4747
<footer>
4848
<div class="container">
49-
Copyright &copy; My Application, <?=date('Y')?>
49+
Copyright &copy; My Application, <?=date('Y')?><br />
50+
<small>
51+
This page is created in <?=round(microtime(true) - PhpMvc\HttpContext::getCurrent()->getRequest()->server('REQUEST_TIME_FLOAT'), 5)?> seconds
52+
<br />
53+
PHP v<?=phpversion()?> &middot; PHP MVC Project v<?=PhpMvc\Info::VERSION?>
54+
</small>
5055
</div>
5156
</footer>
5257
</body>

0 commit comments

Comments
 (0)