Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php declare(strict_types=1); namespace App\Controllers; use App\Services\Auth; use Ps..
Decoded Output download
<?php
declare(strict_types=1);
namespace App\Controllers;
use App\Services\Auth;
use Psr\Http\Message\ResponseInterface;
use Slim\Http\Response;
use Slim\Http\ServerRequest;
use Smarty\Exception as SmartyException;
final class HomeController extends BaseController
{
/**
* @throws SmartyException
*/
public function index(ServerRequest $request, Response $response, array $args): ResponseInterface
{
return $response->write($this->view()->fetch('index.tpl'));
}
/**
* @throws SmartyException
*/
public function tos(ServerRequest $request, Response $response, array $args): ResponseInterface
{
return $response->write($this->view()->fetch('tos.tpl'));
}
/**
* @throws SmartyException
*/
public function staff(ServerRequest $request, Response $response, array $args): ResponseInterface
{
$user = Auth::getUser();
if (! $user->isLogin) {
return $response->withStatus(404)->write($this->view()->fetch('404.tpl'));
}
return $response->write($this->view()->fetch('staff.tpl'));
}
/**
* @throws SmartyException
*/
public function notFound(ServerRequest $request, Response $response, array $args): ResponseInterface
{
return $response->write($this->view()->fetch('404.tpl'));
}
/**
* @throws SmartyException
*/
public function methodNotAllowed(ServerRequest $request, Response $response, array $args): ResponseInterface
{
return $response->write($this->view()->fetch('405.tpl'));
}
/**
* @throws SmartyException
*/
public function internalServerError(ServerRequest $request, Response $response, array $args): ResponseInterface
{
return $response->write($this->view()->fetch('500.tpl'));
}
}
?>
Did this file decode correctly?
Original Code
<?php
declare(strict_types=1);
namespace App\Controllers;
use App\Services\Auth;
use Psr\Http\Message\ResponseInterface;
use Slim\Http\Response;
use Slim\Http\ServerRequest;
use Smarty\Exception as SmartyException;
final class HomeController extends BaseController
{
/**
* @throws SmartyException
*/
public function index(ServerRequest $request, Response $response, array $args): ResponseInterface
{
return $response->write($this->view()->fetch('index.tpl'));
}
/**
* @throws SmartyException
*/
public function tos(ServerRequest $request, Response $response, array $args): ResponseInterface
{
return $response->write($this->view()->fetch('tos.tpl'));
}
/**
* @throws SmartyException
*/
public function staff(ServerRequest $request, Response $response, array $args): ResponseInterface
{
$user = Auth::getUser();
if (! $user->isLogin) {
return $response->withStatus(404)->write($this->view()->fetch('404.tpl'));
}
return $response->write($this->view()->fetch('staff.tpl'));
}
/**
* @throws SmartyException
*/
public function notFound(ServerRequest $request, Response $response, array $args): ResponseInterface
{
return $response->write($this->view()->fetch('404.tpl'));
}
/**
* @throws SmartyException
*/
public function methodNotAllowed(ServerRequest $request, Response $response, array $args): ResponseInterface
{
return $response->write($this->view()->fetch('405.tpl'));
}
/**
* @throws SmartyException
*/
public function internalServerError(ServerRequest $request, Response $response, array $args): ResponseInterface
{
return $response->write($this->view()->fetch('500.tpl'));
}
}
Function Calls
None |
Stats
MD5 | f0c51d9f404d7fc18a0c95cf70a1c5d3 |
Eval Count | 0 |
Decode Time | 93 ms |