e9126e7cde
Fix: Implicitly marking parameter as nullable is deprecated.
...
PHP 8.4 deprecation.
2025-06-07 14:27:47 -03:00
7baad428ec
Refactor request library.
2024-09-08 14:43:56 -04:00
6b470a181d
Fix: Remove unnecesary parameter.
2024-07-10 09:06:51 -04:00
59fff2a586
Add validation on Request.
2024-05-25 16:59:59 -04:00
b85fb7e034
Allow configure SITE_URL with or without slash at end.
2024-05-16 13:48:49 -04:00
a10308a8f6
Fix route and redirect methods error when path not start with slash.
2024-05-16 13:20:35 -04:00
186d640c8f
fix: an empty SITE_URL return a incorrect value of basePath.
2024-05-09 23:10:58 -04:00
f5f803dde2
Reorganize code for PSR and others code prettify.
2024-05-09 15:13:52 -04:00
64bcfa0b00
Add Lib\Request.
2024-05-05 09:38:10 -04:00
cd01ab9e72
Change switch to match.
2023-10-20 16:26:17 -04:00
341d7837a1
Add Router::reconfigure method.
2023-09-08 22:42:50 -04:00
030e1079dc
add mising types, patch method and a new way to set middleware
...
- Removed resumed way to set controllers and middlewares:
Now, the method of routers and middlewares need to be
callables.
- Add patch method in order to support PATCH http method.
- Add a way to get add more middlewares after. For Example:
<?php
use Libs\Router;
Router::get('/some-route', 'somefunction')
->middleware('firstmiddleware');
Router::get('/other-route', 'otherfunction');
// Recover first router and add a middleware
Router::get('/some-route')->middleware('secondmiddleware');
?>
2023-08-22 01:48:04 -04:00
af673a68b8
Add exit after redirect in order to avoid other erros.
2023-08-09 08:54:17 -04:00
d48f24ed98
Improve return types.
2023-04-22 05:32:37 -04:00
a8d95cb55b
Fix empty application/json.
2023-04-14 16:43:50 -04:00
3c8a21161f
Add missing docblocks and return types.
2023-03-25 12:26:42 -04:00
b6555ee039
Fix docblocks.
2022-06-07 23:06:37 -04:00
a641248453
Add middleware priorities.
2022-06-07 23:05:49 -04:00
f38c6610fb
Allow multiple middlewares.
2022-05-18 12:29:07 -04:00
01927ec946
Normalize header comments to phpdoc compatibility.
2022-04-12 15:56:50 -04:00
f43028d72d
Migrate to strong typed (compatible only with PHP 7.0+).
2022-03-17 17:22:04 -04:00
503efef448
Update comments to phpdoc compatible format.
2022-02-23 20:53:36 -04:00
81f2d4d665
Disable th usade of "-" on {pseudovariables}
2022-01-27 11:17:35 -04:00
4b1585fe6d
Change URI to Path.
2022-01-25 09:46:04 -04:00
83c9d28526
Change URI to Path.
2022-01-25 09:42:16 -04:00
a303f28f88
- Change $notFoundCallBack to $notFoundCallback
...
- Minor fixed on comments.
2022-01-24 11:06:39 -04:00
94f1857653
Change not found callback.
2021-11-27 19:21:13 -04:00
6fbf9a2a72
Change indentation.
2021-10-21 23:34:49 -04:00
184d03a214
Fix error on undefined param.
2021-10-15 17:41:47 -04:00
e1fe93a04c
- Change middleware for accept any callable function as param.
...
- $notFoundCallback now has a function as default value (the normal 404 page as before).
- Change the way to manipulate the {pseudoVars} on uri, now it go into the same Neuron onject that "post", "get", and "json" and not more as separate params into the callback (the callback now only receive one param by default).
- $notFoundCallback now receive the $req, as param.
2021-10-15 17:23:20 -04:00
e424139072
Remove unused use.
2021-06-21 16:08:29 -04:00
kj
d23ecfbde6
Add a 404 custom controller option on Router.
2021-03-25 12:02:50 -04:00
831dd7ad47
Fix error on middleware set for DELETE method.
2020-08-11 18:52:35 -04:00
02c0dbef50
- Params renamed to Neuron
...
- add path atribute to Router req
- add viewPath param to View
2020-06-11 06:25:41 -04:00
9d31dc1c24
Add '?>' to Router.php at end.
2020-04-21 18:57:01 -04:00
28880347a4
add comments to Libs.
2020-03-17 13:46:16 -04:00
b07333f3c8
Improve params.
2020-03-16 22:54:12 -04:00
9539b43212
First commit.
2020-03-07 23:37:19 -04:00