61ae73a9e5
First pass for CSS refactor for the dashboard, including the login and index templates. Still rough but the basic structure is in place for both as well as the re-worked css that will be added to the repo later once all the pages have been updated. Lots to do still but a good start.
46 lines
1.4 KiB
PHP
46 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace brain\controller;
|
|
|
|
use Psr\Http\Message\ResponseInterface;
|
|
use Psr\Http\Message\ServerRequestInterface;
|
|
|
|
class RouteControl
|
|
{
|
|
//TODO: Add additional HTTP Methods to better organize API control paths
|
|
public function get(
|
|
ServerRequestInterface $request,
|
|
ResponseInterface $response,
|
|
array $args
|
|
): ResponseInterface {
|
|
switch (isset($args['first']) ? $args['first'] : 'index') {
|
|
case 'dashboard':
|
|
return DashControl::start($request, $response, $args);
|
|
break;
|
|
case 'api':
|
|
return APIControl::get($request, $response, $args);
|
|
break;
|
|
default:
|
|
return IndexControl::start($request, $response, $args);
|
|
break;
|
|
}
|
|
}
|
|
|
|
public function post(
|
|
ServerRequestInterface $request,
|
|
ResponseInterface $response,
|
|
array $args
|
|
): ResponseInterface {
|
|
switch (isset($args['first']) ? $args['first'] : 'index') {
|
|
case 'api':
|
|
//$result = APIControl::post($request, $response, $args);
|
|
return APIControl::post($request, $response, $args);
|
|
break;
|
|
default:
|
|
//echo "YES";
|
|
//return IndexControl::start($request, $response, $args);
|
|
break;
|
|
}
|
|
}
|
|
}
|