Commit Graph

11 Commits

Author SHA1 Message Date
KJ
f5f803dde2 Reorganize code for PSR and others code prettify. 2024-05-09 15:13:52 -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
1267d6b2f6 Fix deprecation warnings on PHP8.2 2023-04-15 13:17:00 -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
01927ec946 Normalize header comments to phpdoc compatibility. 2022-04-12 15:56:50 -04:00
kj
503efef448 Update comments to phpdoc compatible format. 2022-02-23 20:53:36 -04:00
kj
6fbf9a2a72 Change indentation. 2021-10-21 23:34:49 -04:00
kj
68bc906ecf Add default value for argument in Neuron constructor. 2021-10-15 17:22:53 -04:00
kj
02c0dbef50 - Params renamed to Neuron
- add path atribute to Router req
- add viewPath param to View
2020-06-11 06:25:41 -04:00