2023-06-08 15:10:27 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace api\blog;
|
2023-06-09 14:50:20 +01:00
|
|
|
require_once __DIR__ . "/../utils/routesInterface.php";
|
|
|
|
require_once "blogData.php";
|
2023-06-08 15:10:27 +01:00
|
|
|
|
2023-06-09 14:50:20 +01:00
|
|
|
use api\utils\routesInterface;
|
|
|
|
use Psr\Http\Message\ResponseInterface as Response;
|
|
|
|
use Psr\Http\Message\ServerRequestInterface as Request;
|
2023-06-08 15:10:27 +01:00
|
|
|
use Slim\App;
|
|
|
|
|
2023-06-09 14:50:20 +01:00
|
|
|
class blogRoutes implements routesInterface
|
2023-06-08 15:10:27 +01:00
|
|
|
{
|
|
|
|
private blogData $blogData;
|
2023-06-09 14:50:20 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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
|
|
|
|
*/
|
2023-06-08 15:10:27 +01:00
|
|
|
public function __construct(App $app)
|
|
|
|
{
|
|
|
|
$this->blogData = new blogData();
|
|
|
|
$this->createRoutes($app);
|
|
|
|
}
|
|
|
|
|
2023-06-09 14:50:20 +01:00
|
|
|
/**
|
|
|
|
* creates the routes for the blog
|
|
|
|
* @param App $app - the slim app used to create the routes
|
|
|
|
* @return void - returns nothing
|
|
|
|
*/
|
2023-06-08 15:10:27 +01:00
|
|
|
public function createRoutes(App $app): void
|
|
|
|
{
|
|
|
|
// TODO: Implement createRoutes() method.
|
|
|
|
}
|
|
|
|
}
|