kj
ad9f8ec67d
Remove unnecesary brackets.
2024-10-29 19:12:25 -04:00
kj
31c5c63952
Remove innecesary return.
2024-10-29 19:10:47 -04:00
kj
6aef212350
Fix className not returning the classname in the right format.
2024-10-25 10:40:57 -04:00
kj
c600688725
Improve return array dockblocks.
2024-09-23 18:09:38 -04:00
kj
3e27b1b7af
Allow null on enum properties.
2024-09-23 15:06:44 -04:00
kj
73b7b8f72a
Change required valitator to not allow empty values and add exists.
...
The exists validator do the same as the old required.
2024-09-18 14:33:33 -04:00
kj
7baad428ec
Refactor request library.
2024-09-08 14:43:56 -04:00
kj
3d2a607768
Fix where_in is wiping previous where/and/or.
...
For now, works as an AND, but maybe later, same as where will exists
new methods: AndIn and OrIN.
2024-08-30 16:26:03 -04:00
kj
df424ffab5
Model properties now can be typed as enums.
...
With this PHP 8.0 support is dropped.
2024-08-27 19:01:02 -04:00
kj
daf7250882
Catch and verify put and patch input values.
2024-08-13 10:22:44 -04:00
kj
05cd83fd10
Remove unused variable.
2024-07-31 03:29:49 -04:00
kj
6b470a181d
Fix: Remove unnecesary parameter.
2024-07-10 09:06:51 -04:00
kj
7beb161d2b
Ensure db is in transaction to commit or rollback.
2024-06-04 07:18:30 -04:00
kj
701caae7eb
Change route method to static.
2024-05-29 13:24:20 -04:00
kj
100bdfe006
Change private method to protected instead.
2024-05-28 22:27:20 -04:00
kj
f1b79fdbc0
Add http code 422 on verification failed.
2024-05-25 17:41:33 -04:00
kj
406f9a10a1
Add head comment.
2024-05-25 17:19:08 -04:00
kj
cc3cb6be41
Fix: a return was forgot.
2024-05-25 17:11:07 -04:00
kj
59fff2a586
Add validation on Request.
2024-05-25 16:59:59 -04:00
kj
cd1685d2e7
fix on a docblock.
2024-05-21 15:06:02 -04:00
kj
b85fb7e034
Allow configure SITE_URL with or without slash at end.
2024-05-16 13:48:49 -04:00
kj
a10308a8f6
Fix route and redirect methods error when path not start with slash.
2024-05-16 13:20:35 -04:00
kj
9a1e5a2379
Add some explanatory comments to config.
2024-05-14 02:54:23 -04:00
kj
fa60ec5bb4
Move constant definition to config.php
2024-05-14 02:53:39 -04:00
kj
b294b1d627
Update readme.
...
Fix description and add links to starting manual.
2024-05-13 01:08:44 -04:00
kj
27b5ed6015
Convert model name from PascalCase to snake_case (table name).
2024-05-12 04:38:45 -04:00
kj
f9b2c678f7
Support multiple databases at same time.
2024-05-12 03:47:09 -04:00
kj
e294eaa7af
Add route function for View objects.
2024-05-09 23:12:59 -04:00
kj
186d640c8f
fix: an empty SITE_URL return a incorrect value of basePath.
2024-05-09 23:10:58 -04:00
kj
c65fcd27c8
Create new ROOT_CORE constant.
2024-05-09 18:36:48 -04:00
kj
f5f803dde2
Reorganize code for PSR and others code prettify.
2024-05-09 15:13:52 -04:00
kj
6a1085b224
Allow Neuron as $params on view render.
2024-05-09 14:56:07 -04:00
kj
64bcfa0b00
Add Lib\Request.
2024-05-05 09:38:10 -04:00
kj
cd01ab9e72
Change switch to match.
2023-10-20 16:26:17 -04:00
kj
e2094ccb4a
Add option to use another extensions, js and css methods.
2023-09-15 21:26:53 -04:00
kj
341d7837a1
Add Router::reconfigure method.
2023-09-08 22:42:50 -04:00
kj
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
kj
af673a68b8
Add exit after redirect in order to avoid other erros.
2023-08-09 08:54:17 -04:00
kj
eff0b86762
Allow construct Neuron with named arguments.
...
Example:
<?php
$instance = new Neuron(stringValue: 'Hello world', integerValue: 50,
boolValue: false);
echo $instance->stringValue; // "Hello world" will be printed.
?>
Also, is possible to send infinite params without names and his names
will be numeric similar as a non-asociatie array, but as Neuron object.
Example:
<?php
$str = 'Hello world';
$int = 50;
$con = false;
$instance = new Neuron($str, $int);
echo $instance->{0}; // "Hello world" will be printed.
?>
2023-06-04 14:47:58 -04:00
kj
39a1f9d85a
Improve magic function __get.
...
Is not necessary another conditionals. When __get is called
is only when the the property is not defined, so
only need return null in order to avoid the
PHP notice of undefined property.
2023-06-04 14:34:24 -04:00
kj
d48f24ed98
Improve return types.
2023-04-22 05:32:37 -04:00
kj
b326c8e1d0
Fix mising use.
2023-04-16 23:47:49 -04:00
kj
1267d6b2f6
Fix deprecation warnings on PHP8.2
2023-04-15 13:17:00 -04:00
kj
a8d95cb55b
Fix empty application/json.
2023-04-14 16:43:50 -04:00
kj
06b7907f7c
Define mixed type to param $id on getById method.
2023-03-25 21:28:25 -04:00
kj
4d052efba6
Change return type from mixed to ?Model on getFirts and getById methods.
2023-03-25 18:28:21 -04:00
kj
11141a0eee
Allow send string to setNull method.
2023-03-25 12:27:33 -04:00
kj
3c8a21161f
Add missing docblocks and return types.
2023-03-25 12:26:42 -04:00
kj
1bde430251
Improve Neuron and allow use to clone another object.
2023-03-15 22:16:05 -04:00
kj
7d3d1615d5
Fix View:txt and add charset.
2022-11-22 00:59:20 -04:00
kj
404bd59569
Improve where, and, or and search method.
...
- static::$querySelect['AndOr'] is REMOVED.
- where, and, or and search now use only the
static::$querySelect['where'] index.
- removed unnecesary brackets on buildQuery.
2022-08-22 15:26:32 -04:00
kj
53bdc92344
Add bindValue method to Libs\Model.
2022-08-18 16:38:40 -04:00
kj
ad7b78f427
Fix prepare variables when special where/and/or columns.
2022-08-12 06:31:54 -04:00
kj
38d2a90318
Fix count when using joins.
2022-08-12 05:46:24 -04:00
kj
2411704662
Add sqlite support.
2022-08-04 05:30:22 -04:00
kj
08d92a2b81
Allow usage of bool types on the ORM.
2022-08-01 08:27:49 -04:00
kj
8d47e10d7a
Fix resetQuery.
2022-07-29 22:23:07 -04:00
kj
2c7938a0c3
Set default fetch mode to fetch assoc.
2022-07-24 00:29:34 -04:00
kj
c57ca191b1
Rename limit() variables with better names and add description.
2022-07-19 12:08:22 -04:00
kj
f4eabe6d54
Minor fixes.
...
- Add some uses.
- Fix typo and order error con docl block.
2022-07-14 22:39:38 -04:00
kj
83d9ba55aa
Update migration notes.
2022-07-14 22:08:43 -04:00
kj
bad7bf0e65
Update config template.
2022-07-14 22:03:07 -04:00
kj
5284be2b1b
Update org files.
2022-07-14 21:59:27 -04:00
kj
0db6e4a021
rework to change from MySQLi to PDO.
2022-07-14 21:41:48 -04:00
kj
afb4c914a1
Fix error on where_in with string values.
2022-07-10 12:10:01 -04:00
kj
4c4fe6f1f7
Change View to work as instance and render text and json.
2022-06-25 21:11:11 -04:00
kj
b6555ee039
Fix docblocks.
2022-06-07 23:06:37 -04:00
kj
a641248453
Add middleware priorities.
2022-06-07 23:05:49 -04:00
kj
eb27acf68e
Add middleware lib.
2022-05-18 12:29:27 -04:00
kj
f38c6610fb
Allow multiple middlewares.
2022-05-18 12:29:07 -04:00
kj
4003a88f66
Insignificant change: Rename some variables.
2022-04-14 12:52:52 -04:00
kj
01927ec946
Normalize header comments to phpdoc compatibility.
2022-04-12 15:56:50 -04:00
kj
a23e795f5c
Fix error on getVars when get not set properties.
2022-04-05 17:12:30 -04:00
kj
9689ac82cf
Fix wrong result type on getById.
2022-03-30 14:09:08 -04:00
kj
fe61d14713
Fix error on save.
2022-03-28 21:55:29 -04:00
kj
97380b2bee
Change ModelMySQL atributes to strong typed.
2022-03-22 04:30:47 -04:00
kj
4cd7850931
fix result type on ModelMySQL::query.
2022-03-17 22:38:10 -04:00
kj
4240b048fd
add missing use for mysqli_result.
2022-03-17 22:31:47 -04:00
kj
f43028d72d
Migrate to strong typed (compatible only with PHP 7.0+).
2022-03-17 17:22:04 -04:00
kj
503efef448
Update comments to phpdoc compatible format.
2022-02-23 20:53:36 -04:00
kj
81f2d4d665
Disable th usade of "-" on {pseudovariables}
2022-01-27 11:17:35 -04:00
kj
4b1585fe6d
Change URI to Path.
2022-01-25 09:46:04 -04:00
kj
83c9d28526
Change URI to Path.
2022-01-25 09:42:16 -04:00
kj
a303f28f88
- Change $notFoundCallBack to $notFoundCallback
...
- Minor fixed on comments.
2022-01-24 11:06:39 -04:00
kj
94f1857653
Change not found callback.
2021-11-27 19:21:13 -04:00
kj
6fbf9a2a72
Change indentation.
2021-10-21 23:34:49 -04:00
kj
790930771f
Add directories default estructure.
2021-10-15 17:52:14 -04:00
kj
184d03a214
Fix error on undefined param.
2021-10-15 17:41:47 -04:00
kj
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
kj
68bc906ecf
Add default value for argument in Neuron constructor.
2021-10-15 17:22:53 -04:00
kj
b8b1a1c8f9
Enable to use limit funtion on count function instead send limit directly.
2021-09-11 20:02:23 -04:00
kj
182635bc9c
- Remove option for use non-optimized count.
...
- Add option for limit count.
2021-09-11 19:04:54 -04:00
kj
b80ab19d7e
Add option for use non-optimized count.
2021-09-11 18:27:15 -04:00
kj
405cf1cb34
Fix count on not resetQuery.
2021-08-14 17:46:14 -04:00
kj
8069fb28a1
Ignore orderby on count.
2021-08-14 17:45:23 -04:00
kj
e3b97601e2
- Add option for reset query or not at get, getFirts, buildQuery and count
...
- Add sql_calc_found_rows method.
- Add found_rows method.
- Improve count method usind sql_calc_found_rows and found_rows.
2021-08-14 17:30:03 -04:00
kj
9785954870
Add SITE_URL constant.
2021-07-10 15:53:48 -04:00
kj
e424139072
Remove unused use.
2021-06-21 16:08:29 -04:00
kj
8d418c8eb9
Change private functions to protected.
2021-01-12 21:29:23 -04:00
kj
69c982b3e9
Fix join orden on query.
2020-12-03 11:13:30 -04:00