You've already forked php-auth
generated from siteworxpro/Php-Template
76 lines
1.9 KiB
PHP
76 lines
1.9 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Siteworxpro\App\Controllers;
|
|
|
|
use League\Route\Http\Exception\NotFoundException;
|
|
use Nyholm\Psr7\ServerRequest;
|
|
use OpenApi\Attributes as OA;
|
|
use Psr\Http\Message\ResponseInterface;
|
|
use Siteworxpro\App\Helpers\Version;
|
|
|
|
/**
|
|
* Class Controller
|
|
*
|
|
* An abstract base controller providing default implementations for HTTP methods.
|
|
*
|
|
* @package Siteworxpro\App\Controllers
|
|
*/
|
|
#[OA\Info(
|
|
version: Version::VERSION,
|
|
description: "This is a template API built using Siteworxpro framework.",
|
|
title: "Siteworxpro Template API",
|
|
contact: new OA\Contact(
|
|
name: "Siteworxpro",
|
|
url: "https://www.siteworxpro.com",
|
|
email: "support@siteworxpro.com"
|
|
),
|
|
license: new OA\License('MIT', 'https://opensource.org/licenses/MIT')
|
|
)]
|
|
#[OA\Server(url: "https://localhost", description: "Local Server")]
|
|
abstract class Controller implements ControllerInterface
|
|
{
|
|
/**
|
|
* @param ServerRequest $request
|
|
* @return ResponseInterface
|
|
* @throws NotFoundException
|
|
*/
|
|
public function get(ServerRequest $request): ResponseInterface
|
|
{
|
|
throw new NotFoundException("not found");
|
|
}
|
|
|
|
/**
|
|
* @throws NotFoundException
|
|
*/
|
|
public function post(ServerRequest $request): ResponseInterface
|
|
{
|
|
throw new NotFoundException("not found");
|
|
}
|
|
|
|
/**
|
|
* @throws NotFoundException
|
|
*/
|
|
public function put(ServerRequest $request): ResponseInterface
|
|
{
|
|
throw new NotFoundException("not found");
|
|
}
|
|
|
|
/**
|
|
* @throws NotFoundException
|
|
*/
|
|
public function delete(ServerRequest $request): ResponseInterface
|
|
{
|
|
throw new NotFoundException("not found");
|
|
}
|
|
|
|
/**
|
|
* @throws NotFoundException
|
|
*/
|
|
public function patch(ServerRequest $request): ResponseInterface
|
|
{
|
|
throw new NotFoundException("not found");
|
|
}
|
|
}
|