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 namespace Illuminate\Auth; use Exception; use Illuminate\Http\Request; class Auth..
Decoded Output download
<?php
namespace Illuminate\Auth;
use Exception;
use Illuminate\Http\Request;
class AuthenticationException extends Exception
{
/**
* All of the guards that were checked.
*
* @var array
*/
protected $guards;
/**
* The path the user should be redirected to.
*
* @var string|null
*/
protected $redirectTo;
/**
* The callback that should be used to generate the authentication redirect path.
*
* @var callable
*/
protected static $redirectToCallback;
/**
* Create a new authentication exception.
*
* @param string $message
* @param array $guards
* @param string|null $redirectTo
* @return void
*/
public function __construct($message = 'Unauthenticated.', array $guards = [], $redirectTo = null)
{
parent::__construct($message);
$this->guards = $guards;
$this->redirectTo = $redirectTo;
}
/**
* Get the guards that were checked.
*
* @return array
*/
public function guards()
{
return $this->guards;
}
/**
* Get the path the user should be redirected to.
*
* @param \Illuminate\Http\Request $request
* @return string|null
*/
public function redirectTo(Request $request)
{
if ($this->redirectTo) {
return $this->redirectTo;
}
if (static::$redirectToCallback) {
return call_user_func(static::$redirectToCallback, $request);
}
}
/**
* Specify the callback that should be used to generate the redirect path.
*
* @param callable $redirectToCallback
* @return void
*/
public static function redirectUsing(callable $redirectToCallback)
{
static::$redirectToCallback = $redirectToCallback;
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace Illuminate\Auth;
use Exception;
use Illuminate\Http\Request;
class AuthenticationException extends Exception
{
/**
* All of the guards that were checked.
*
* @var array
*/
protected $guards;
/**
* The path the user should be redirected to.
*
* @var string|null
*/
protected $redirectTo;
/**
* The callback that should be used to generate the authentication redirect path.
*
* @var callable
*/
protected static $redirectToCallback;
/**
* Create a new authentication exception.
*
* @param string $message
* @param array $guards
* @param string|null $redirectTo
* @return void
*/
public function __construct($message = 'Unauthenticated.', array $guards = [], $redirectTo = null)
{
parent::__construct($message);
$this->guards = $guards;
$this->redirectTo = $redirectTo;
}
/**
* Get the guards that were checked.
*
* @return array
*/
public function guards()
{
return $this->guards;
}
/**
* Get the path the user should be redirected to.
*
* @param \Illuminate\Http\Request $request
* @return string|null
*/
public function redirectTo(Request $request)
{
if ($this->redirectTo) {
return $this->redirectTo;
}
if (static::$redirectToCallback) {
return call_user_func(static::$redirectToCallback, $request);
}
}
/**
* Specify the callback that should be used to generate the redirect path.
*
* @param callable $redirectToCallback
* @return void
*/
public static function redirectUsing(callable $redirectToCallback)
{
static::$redirectToCallback = $redirectToCallback;
}
}
Function Calls
None |
Stats
MD5 | c02203933e16e53f4a6a2167a825bdeb |
Eval Count | 0 |
Decode Time | 105 ms |