From 32c06985af540326bccb33f344584cb291a5359a Mon Sep 17 00:00:00 2001 From: Igor Ilic Date: Fri, 1 Oct 2021 12:24:13 +0000 Subject: [PATCH] [AUTO] Update documentation --- docs/classes/Gac-Routing-Request.html | 14 +- docs/classes/Gac-Routing-Routes.html | 409 ++++++++++++++++++++++++-- docs/js/searchIndex.js | 36 ++- docs/reports/markers.html | 2 +- 4 files changed, 432 insertions(+), 29 deletions(-) diff --git a/docs/classes/Gac-Routing-Request.html b/docs/classes/Gac-Routing-Request.html index fff7d7a..7abfe0b 100644 --- a/docs/classes/Gac-Routing-Request.html +++ b/docs/classes/Gac-Routing-Request.html @@ -173,7 +173,7 @@

 : array<string|int, mixed> -
+
Private method used for parsing request body data for PUT and PATCH requests
@@ -469,24 +469,26 @@

Request.php : - 80 + 84 - +

Private method used for parsing request body data for PUT and PATCH requests

+ private parse_patch_and_put_request_data() : array<string|int, mixed> -
- +

Return values
array<string|int, mixed> — - +

Return an array of request body data

+
+ diff --git a/docs/classes/Gac-Routing-Routes.html b/docs/classes/Gac-Routing-Routes.html index 7ebee35..4e6eae1 100644 --- a/docs/classes/Gac-Routing-Routes.html +++ b/docs/classes/Gac-Routing-Routes.html @@ -210,6 +210,20 @@

Method used for adding new routes
+
+ delete() + +  : Routes +
+
Wrapper method used for adding new POST routes
+ +
+ get() + +  : Routes +
+
Wrapper method used for adding new GET routes
+
getRoutes() @@ -231,6 +245,20 @@

Method used to set the middlewares for routes
+
+ patch() + +  : Routes +
+
Wrapper method used for adding new POS routes
+ +
+ post() + +  : Routes +
+
Wrapper method used for adding new POST routes
+
prefix() @@ -238,26 +266,40 @@

Method used to set the prefix for routes
+
+ put() + +  : Routes +
+
Wrapper method used for adding new POST routes
+
route() -  : self +  : Routes
Method used to handle execution of routes and middlewares
+
+ save() + +  : mixed +
+
+
execute_middleware()  : mixed
-
Method which executes each specified middleware before the routes callback is executed
+
Method which executes each specified middleware before the route's callback is executed
get_all_arguments()  : array<string|int, mixed>|null
-
Private method used to fetch the arguments of the routs callback methods
+
Private method used to fetch the arguments of the route's callback methods
getPath() @@ -652,7 +694,7 @@

@@ -701,6 +743,118 @@

Return values
— + +
+

+ delete() + +

+ + +

Wrapper method used for adding new POST routes

+ + + public + delete(string $path[, callable|array<string|int, mixed>|string|null $callback = NULL ]) : Routes + + +
Parameters
+
+
+ $path + : string +
+
+

Path for the route

+
+ +
+
+ $callback + : callable|array<string|int, mixed>|string|null + = NULL
+
+

Callback method, an anonymous function or a class and method name to be executed

+
+ +
+
+ + + +
Return values
+ Routes + — +

Returns an instance of itself so that other methods could be chained onto it

+
+ + +
+
+

+ get() + +

+ + +

Wrapper method used for adding new GET routes

+ + + public + get(string $path[, callable|array<string|int, mixed>|string|null $callback = NULL ]) : Routes + + +
Parameters
+
+
+ $path + : string +
+
+

Path for the route

+
+ +
+
+ $callback + : callable|array<string|int, mixed>|string|null + = NULL
+
+

Callback method, an anonymous function or a class and method name to be executed

+
+ +
+
+ + + +
Return values
+ Routes + — +

Returns an instance of itself so that other methods could be chained onto it

+
+ +
@@ -748,7 +902,7 @@

@@ -836,7 +990,119 @@

Parameters
Return values
Routes — -

Returns an instance of it self so that other methods could be chained onto it

+

Returns an instance of itself so that other methods could be chained onto it

+
+ + +
+
+

+ patch() + +

+ + +

Wrapper method used for adding new POS routes

+ + + public + patch(string $path[, callable|array<string|int, mixed>|string|null $callback = NULL ]) : Routes + + +
Parameters
+
+
+ $path + : string +
+
+

Path for the route

+
+ +
+
+ $callback + : callable|array<string|int, mixed>|string|null + = NULL
+
+

Callback method, an anonymous function or a class and method name to be executed

+
+ +
+
+ + + +
Return values
+ Routes + — +

Returns an instance of itself so that other methods could be chained onto it

+
+ + +
+
+

+ post() + +

+ + +

Wrapper method used for adding new POST routes

+ + + public + post(string $path[, callable|array<string|int, mixed>|string|null $callback = NULL ]) : Routes + + +
Parameters
+
+
+ $path + : string +
+
+

Path for the route

+
+ +
+
+ $callback + : callable|array<string|int, mixed>|string|null + = NULL
+
+

Callback method, an anonymous function or a class and method name to be executed

+
+ +
+
+ + + +
Return values
+ Routes + — +

Returns an instance of itself so that other methods could be chained onto it

@@ -883,7 +1149,63 @@
Parameters
Return values
Routes — -

Returns an instance of it self so that other methods could be chained onto it

+

Returns an instance of itself so that other methods could be chained onto it

+
+ + +
+
+

+ put() + +

+ + +

Wrapper method used for adding new POST routes

+ + + public + put(string $path[, callable|array<string|int, mixed>|string|null $callback = NULL ]) : Routes + + +
Parameters
+
+
+ $path + : string +
+
+

Path for the route

+
+ +
+
+ $callback + : callable|array<string|int, mixed>|string|null + = NULL
+
+

Callback method, an anonymous function or a class and method name to be executed

+
+ +
+
+ + + +
Return values
+ Routes + — +

Returns an instance of itself so that other methods could be chained onto it

@@ -901,7 +1223,7 @@

@@ -909,7 +1231,7 @@

public - route(string $path, callable|array<string|int, mixed>|string $callback[, string|array<string|int, mixed> $methods = self::GET ]) : self + route(string $path, callable|array<string|int, mixed>|string|null $callback[, string|array<string|int, mixed> $methods = self::GET ]) : Routes

Parameters
@@ -919,21 +1241,70 @@
Parameters
: string
-
+

Path for the route

+
$callback - : callable|array<string|int, mixed>|string + : callable|array<string|int, mixed>|string|null
-
+

Callback method, an anonymous function or a class and method name to be executed

+
$methods : string|array<string|int, mixed> = self::GET
+
+

Allowed request method(s) (GET, POST, PUT...)

+
+ +
+ + + + +

Return values
+ Routes + — +

Returns an instance of itself so that other methods could be chained onto it

+
+ + + +
+

+ save() + +

+ + + + + public + save([bool $cleanData = true ]) : mixed + +
+ +
Parameters
+
+
+ $cleanData + : bool + = true
@@ -943,7 +1314,7 @@
Parameters
Return values
- self + mixed — @@ -961,11 +1332,11 @@

-

Method which executes each specified middleware before the routes callback is executed

+

Method which executes each specified middleware before the route's callback is executed

private @@ -1022,11 +1393,11 @@

-

Private method used to fetch the arguments of the routs callback methods

+

Private method used to fetch the arguments of the route's callback methods

private @@ -1067,7 +1438,7 @@

diff --git a/docs/js/searchIndex.js b/docs/js/searchIndex.js index 235f78b..66788f3 100644 --- a/docs/js/searchIndex.js +++ b/docs/js/searchIndex.js @@ -43,7 +43,7 @@ Search.appendIndex( }, { "fqsen": "\\Gac\\Routing\\Request\u003A\u003Aparse_patch_and_put_request_data\u0028\u0029", "name": "parse_patch_and_put_request_data", - "summary": "", + "summary": "Private\u0020method\u0020used\u0020for\u0020parsing\u0020request\u0020body\u0020data\u0020for\u0020PUT\u0020and\u0020PATCH\u0020requests", "url": "classes/Gac-Routing-Request.html#method_parse_patch_and_put_request_data" }, { "fqsen": "\\Gac\\Routing\\Request\u003A\u003A\u0024data", @@ -80,6 +80,11 @@ Search.appendIndex( "name": "add", "summary": "Method\u0020used\u0020for\u0020adding\u0020new\u0020routes", "url": "classes/Gac-Routing-Routes.html#method_add" + }, { + "fqsen": "\\Gac\\Routing\\Routes\u003A\u003Asave\u0028\u0029", + "name": "save", + "summary": "", + "url": "classes/Gac-Routing-Routes.html#method_save" }, { "fqsen": "\\Gac\\Routing\\Routes\u003A\u003Ahandle\u0028\u0029", "name": "handle", @@ -88,12 +93,12 @@ Search.appendIndex( }, { "fqsen": "\\Gac\\Routing\\Routes\u003A\u003Aget_all_arguments\u0028\u0029", "name": "get_all_arguments", - "summary": "Private\u0020method\u0020used\u0020to\u0020fetch\u0020the\u0020arguments\u0020of\u0020the\u0020routs\u0020callback\u0020methods", + "summary": "Private\u0020method\u0020used\u0020to\u0020fetch\u0020the\u0020arguments\u0020of\u0020the\u0020route\u0027s\u0020callback\u0020methods", "url": "classes/Gac-Routing-Routes.html#method_get_all_arguments" }, { "fqsen": "\\Gac\\Routing\\Routes\u003A\u003Aexecute_middleware\u0028\u0029", "name": "execute_middleware", - "summary": "Method\u0020which\u0020executes\u0020each\u0020specified\u0020middleware\u0020before\u0020the\u0020routes\u0020callback\u0020is\u0020executed", + "summary": "Method\u0020which\u0020executes\u0020each\u0020specified\u0020middleware\u0020before\u0020the\u0020route\u0027s\u0020callback\u0020is\u0020executed", "url": "classes/Gac-Routing-Routes.html#method_execute_middleware" }, { "fqsen": "\\Gac\\Routing\\Routes\u003A\u003AgetPath\u0028\u0029", @@ -105,6 +110,31 @@ Search.appendIndex( "name": "getRoutes", "summary": "Return\u0020the\u0020list\u0020of\u0020defined\u0020routed", "url": "classes/Gac-Routing-Routes.html#method_getRoutes" + }, { + "fqsen": "\\Gac\\Routing\\Routes\u003A\u003Aget\u0028\u0029", + "name": "get", + "summary": "Wrapper\u0020method\u0020used\u0020for\u0020adding\u0020new\u0020GET\u0020routes", + "url": "classes/Gac-Routing-Routes.html#method_get" + }, { + "fqsen": "\\Gac\\Routing\\Routes\u003A\u003Apost\u0028\u0029", + "name": "post", + "summary": "Wrapper\u0020method\u0020used\u0020for\u0020adding\u0020new\u0020POST\u0020routes", + "url": "classes/Gac-Routing-Routes.html#method_post" + }, { + "fqsen": "\\Gac\\Routing\\Routes\u003A\u003Aput\u0028\u0029", + "name": "put", + "summary": "Wrapper\u0020method\u0020used\u0020for\u0020adding\u0020new\u0020POST\u0020routes", + "url": "classes/Gac-Routing-Routes.html#method_put" + }, { + "fqsen": "\\Gac\\Routing\\Routes\u003A\u003Apatch\u0028\u0029", + "name": "patch", + "summary": "Wrapper\u0020method\u0020used\u0020for\u0020adding\u0020new\u0020POS\u0020routes", + "url": "classes/Gac-Routing-Routes.html#method_patch" + }, { + "fqsen": "\\Gac\\Routing\\Routes\u003A\u003Adelete\u0028\u0029", + "name": "delete", + "summary": "Wrapper\u0020method\u0020used\u0020for\u0020adding\u0020new\u0020POST\u0020routes", + "url": "classes/Gac-Routing-Routes.html#method_delete" }, { "fqsen": "\\Gac\\Routing\\Routes\u003A\u003AGET", "name": "GET", diff --git a/docs/reports/markers.html b/docs/reports/markers.html index dd614bf..4ae9876 100644 --- a/docs/reports/markers.html +++ b/docs/reports/markers.html @@ -112,7 +112,7 @@

Routes.php

TODO - 203 + 218 Find a way to not check the number of / as it seems a bit hacky