Add PHPDocs generated by ChatGPT,

add additional clarification to some functions,
add addNewsComment function and API, currently untested and not implemented in the client,
fix a bunch of stuff that PHPStorm pointed out
This commit is contained in:
2024-04-28 22:37:23 +02:00
parent 6e7df7f034
commit 1c9f5cf3c0
17 changed files with 659 additions and 142 deletions

View File

@@ -1,6 +1,14 @@
<?php
/**
* Initializes the routing system for a web application. This function processes the incoming
* URL and determines the site name and page name based on the configuration and the URL structure.
* It handles default configurations and supports different types of requests like API or page requests.
*
* @global array $routerConfig The global configuration array that includes default site and page settings.
* @return array Returns an associative array containing the routing information, including the site name,
* page name, request type, and parsed request address from the HTTP host.
*/
function initRouter(): array
{
global $routerConfig;