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:
Vendored
+16
-1
@@ -1,18 +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.
|
||||
|
||||
Reference in New Issue
Block a user