Download src/Presentation/RequestHandlers/App/PayoutsView.php from pnacorp/AIKEEDO: direct link, hf CLI and curl.
- Browser
- Download file 938 Bytes
-
https://huggingface.co/pnacorp/AIKEEDO/resolve/main/src/Presentation/RequestHandlers/App/PayoutsView.php
- Command line
-
hf download hf://pnacorp/AIKEEDO/src/Presentation/RequestHandlers/App/PayoutsView.php
-
curl -L -o PayoutsView.php https://huggingface.co/pnacorp/AIKEEDO/resolve/main/src/Presentation/RequestHandlers/App/PayoutsView.php
938 Bytes
| declare(strict_types=1); | |
| namespace Presentation\RequestHandlers\App; | |
| use Easy\Container\Attributes\Inject; | |
| use Easy\Http\Message\RequestMethod; | |
| use Easy\Router\Attributes\Route; | |
| use Presentation\Response\RedirectResponse; | |
| use Presentation\Response\ViewResponse; | |
| use Psr\Http\Message\ServerRequestInterface; | |
| use Psr\Http\Message\ResponseInterface; | |
| use Psr\Http\Server\RequestHandlerInterface; | |
| (path: '/payouts', method: RequestMethod::GET) | |
| class PayoutsView extends AppView implements | |
| RequestHandlerInterface | |
| { | |
| public function __construct( | |
| #[Inject('option.affiliates.is_enabled')] | |
| private bool $isEnabled = false | |
| ) {} | |
| public function handle(ServerRequestInterface $request): ResponseInterface | |
| { | |
| if (!$this->isEnabled) { | |
| return new RedirectResponse('/app'); | |
| } | |
| return new ViewResponse( | |
| '/templates/app/payouts.twig', | |
| ); | |
| } | |
| } | |