2022-12-20
This commit is contained in:
@ -6,6 +6,7 @@ use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use function Safe\{json_decode, file_get_contents};
|
||||
use ProVM\Alias\Controller\Json;
|
||||
use ProVM\Implement\Path;
|
||||
|
||||
class Base
|
||||
{
|
||||
@ -13,12 +14,8 @@ class Base
|
||||
|
||||
public function __invoke(ServerRequestInterface $request, ResponseInterface $response, ContainerInterface $container): ResponseInterface
|
||||
{
|
||||
$folder = $container->get('folders')->documentation;
|
||||
$filename = implode(DIRECTORY_SEPARATOR, [
|
||||
$folder,
|
||||
'base.json'
|
||||
]);
|
||||
$documentation = json_decode(file_get_contents($filename));
|
||||
$filename = $container->get('documentation');
|
||||
$documentation = json_decode(trim(file_get_contents($filename)));
|
||||
return $this->withJson($response, $documentation);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user