Skip to content

Commit e83fd40

Browse files
committed
Update
1 parent b7fee72 commit e83fd40

17 files changed

+55
-52
lines changed

.gitignore

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
composer.phar
22
/vendor/
3-
4-
# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
5-
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
6-
# composer.lock
3+
*.bak.php

composer.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "floatphp/kernel",
3-
"version" : "1.1.3",
3+
"version" : "1.2.0",
44
"type": "library",
55
"description": "FloatPHP Kernel Components",
66
"keywords": ["php","micro-framework","framework","PSR","ORM","jakiboy","composer"],
@@ -17,13 +17,13 @@
1717
"php": ">=8.2",
1818
"ext-curl": "*",
1919
"ext-intl": "*",
20-
"twig/twig": "^3.14.0",
20+
"twig/twig": "^3.14.2",
2121
"justinrainbow/json-schema": "^6.0.0",
22-
"floatphp/classes": "^1.1.0",
23-
"floatphp/helpers": "^1.1.0",
24-
"floatphp/interfaces": "^1.1.0",
25-
"floatphp/exceptions": "^1.1.0",
26-
"floatphp/cli": "^1.1.0"
22+
"floatphp/classes": "^1.2.0",
23+
"floatphp/helpers": "^1.2.0",
24+
"floatphp/interfaces": "^1.2.0",
25+
"floatphp/exceptions": "^1.2.0",
26+
"floatphp/cli": "^1.2.0"
2727
},
2828
"autoload": {
2929
"psr-4" : {

src/AbstractAuthController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @author : Jakiboy
44
* @package : FloatPHP
55
* @subpackage : Kernel Component
6-
* @version : 1.1.0
6+
* @version : 1.2.x
77
* @copyright : (c) 2018 - 2024 Jihad Sinnaour <[email protected]>
88
* @link : https://floatphp.com
99
* @license : MIT

src/ApiController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @author : Jakiboy
44
* @package : FloatPHP
55
* @subpackage : Kernel Component
6-
* @version : 1.1.0
6+
* @version : 1.2.x
77
* @copyright : (c) 2018 - 2024 Jihad Sinnaour <[email protected]>
88
* @link : https://floatphp.com
99
* @license : MIT

src/BackendController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @author : Jakiboy
44
* @package : FloatPHP
55
* @subpackage : Kernel Component
6-
* @version : 1.1.0
6+
* @version : 1.2.x
77
* @copyright : (c) 2018 - 2024 Jihad Sinnaour <[email protected]>
88
* @link : https://floatphp.com
99
* @license : MIT

src/Base.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @author : Jakiboy
44
* @package : FloatPHP
55
* @subpackage : Kernel Component
6-
* @version : 1.1.0
6+
* @version : 1.2.x
77
* @copyright : (c) 2018 - 2024 Jihad Sinnaour <[email protected]>
88
* @link : https://floatphp.com
99
* @license : MIT
@@ -93,9 +93,12 @@ protected function translate(string $string) : string
9393
}
9494

9595
$slug = $string;
96-
foreach ($this->matchEveryString('/([A-Z])/', $slug) as $upper) {
96+
$this->matchEveryString('/([A-Z])/', $slug, $matches, -1);
97+
98+
foreach ($matches as $upper) {
9799
$slug = $this->replaceString($upper, "{$upper}1-", $slug);
98100
}
101+
99102
$slug = $this->slugify($slug);
100103
$slug = $this->limitString($slug);
101104

src/BaseController.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @author : Jakiboy
44
* @package : FloatPHP
55
* @subpackage : Kernel Component
6-
* @version : 1.1.0
6+
* @version : 1.2.x
77
* @copyright : (c) 2018 - 2024 Jihad Sinnaour <[email protected]>
88
* @link : https://floatphp.com
99
* @license : MIT
@@ -86,8 +86,8 @@ public function hasAccess() : bool
8686
protected function addJS(string $js, string $hook = 'add-js')
8787
{
8888
$this->addAction($hook, function() use($js) {
89-
$tpl = $this->applyFilter('view-js', 'system/js');
90-
$this->render(['js' => $js], $tpl);
89+
$file = $this->applyFilter('view-js', 'system/js');
90+
$this->render($file, ['js' => $js]);
9191
});
9292
}
9393

@@ -102,8 +102,8 @@ protected function addJS(string $js, string $hook = 'add-js')
102102
protected function addCSS(string $css, string $hook = 'add-css')
103103
{
104104
$this->addAction($hook, function() use($css){
105-
$tpl = $this->applyFilter('view-css', 'system/css');
106-
$this->render(['css' => $css], $tpl);
105+
$file = $this->applyFilter('view-css', 'system/css');
106+
$this->render($file, ['css' => $css]);
107107
});
108108
}
109109

src/Core.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @author : Jakiboy
44
* @package : FloatPHP
55
* @subpackage : Kernel Component
6-
* @version : 1.1.0
6+
* @version : 1.2.x
77
* @copyright : (c) 2018 - 2024 Jihad Sinnaour <[email protected]>
88
* @link : https://floatphp.com
99
* @license : MIT

src/ErrorController.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @author : Jakiboy
44
* @package : FloatPHP
55
* @subpackage : Kernel Component
6-
* @version : 1.1.0
6+
* @version : 1.2.x
77
* @copyright : (c) 2018 - 2024 Jihad Sinnaour <[email protected]>
88
* @link : https://floatphp.com
99
* @license : MIT
@@ -40,16 +40,16 @@ public function __construct($code = 404, $error = null, $render = true)
4040

4141
if ( $render ) {
4242

43-
$type = $this->applyFilter('error-response-type', 'text/html;charset=utf-8');
44-
$template = $this->applyFilter('error-template', '/system/error');
45-
$error = $this->applyFilter('error', $this->translate($error));
43+
$type = $this->applyFilter('error-response-type', 'text/html;charset=utf-8');
44+
$file = $this->applyFilter('error-template', '/system/error');
45+
$error = $this->applyFilter('error', $this->translate($error));
4646

4747
Response::setHttpHeaders($code, $type);
48-
$this->render([
48+
$this->render($file, [
4949
'status' => $message,
5050
'code' => $code,
5151
'error' => $error
52-
], $template);
52+
]);
5353

5454
die();
5555

src/FrontController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @author : Jakiboy
44
* @package : FloatPHP
55
* @subpackage : Kernel Component
6-
* @version : 1.1.0
6+
* @version : 1.2.x
77
* @copyright : (c) 2018 - 2024 Jihad Sinnaour <[email protected]>
88
* @link : https://floatphp.com
99
* @license : MIT

0 commit comments

Comments
 (0)