Fixed bugs in blog routes and added doc comments to all route files

Signed-off-by: rodude123 <rodude123@gmail.com>
This commit is contained in:
2023-06-09 14:50:20 +01:00
parent e339204bd7
commit e82ec15504
10 changed files with 108 additions and 4 deletions
+22 -1
View File
@@ -1,12 +1,33 @@
<?php
namespace api\blog;
require_once __DIR__ . "/../utils/routesInterface.php";
require_once "blogData.php";
use api\utils\routesInterface;
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use Slim\App;
class blogRoutes implements \api\utils\routesInterface
class blogRoutes implements routesInterface
{
private blogData $blogData;
/**
* constructor used to instantiate a base blog routes, to be used in the index.php file.
* @param App $app - the slim app used to create the routes
*/
public function __construct(App $app)
{
$this->blogData = new blogData();
$this->createRoutes($app);
}
/**
* creates the routes for the blog
* @param App $app - the slim app used to create the routes
* @return void - returns nothing
*/
public function createRoutes(App $app): void
{
// TODO: Implement createRoutes() method.