CliController
extends Controller
in package
FinalYes
Controller authentication component. This class authorizes access to an api controller within the framework
Tags
Table of Contents
Properties
- $allow_all : bool
- $allowed_actions : array<string|int, mixed>
- An array of actions for this instance's controller that have been allowed public access
- $controller : IController
- $denied_actions : array<string|int, mixed>
- An array of actions for this instance's controller that have been denied public access
- $user : IUser
- $hashCode : int
- $hashCounter : int
Methods
- __call() : mixed
- __callStatic() : mixed
- __construct() : mixed
- __destruct() : mixed
- __get() : mixed
- allow() : null
- Allows public access to a controller's action
- allowAll() : void
- allowsAll() : bool
- authenticate() : bool
- deny() : null
- Denies public access to a controllers's action
- extends() : bool
- getReflection() : ReflectionClass
- getUser() : IUser
- isAllowed() : bool
- Determines if an action is publicly accessible by this authenticator's controller.
- setController() : void
- setUser() : void
- init() : null
Properties
$allow_all
protected
bool
$allow_all
= false
$allowed_actions
An array of actions for this instance's controller that have been allowed public access
protected
array<string|int, mixed>
$allowed_actions
= array()
$controller
protected
IController
$controller
$denied_actions
An array of actions for this instance's controller that have been denied public access
protected
array<string|int, mixed>
$denied_actions
= array()
$user
protected
IUser
$user
$hashCode
private
int
$hashCode
$hashCounter
private
static int
$hashCounter
= 0
Methods
__call()
public
__call(string $method, array<string|int, mixed> $arguments) : mixed
Parameters
- $method : string
- $arguments : array<string|int, mixed>
Tags
__callStatic()
public
static __callStatic(mixed $method, array<string|int, mixed> $arguments) : mixed
Parameters
- $method : mixed
- $arguments : array<string|int, mixed>
__construct()
public
__construct(IController $controller) : mixed
Parameters
- $controller : IController
Tags
__destruct()
public
__destruct() : mixed
__get()
public
__get(string $property) : mixed
Parameters
- $property : string
allow()
Allows public access to a controller's action
public
allow(string $action) : null
Parameters
- $action : string
-
The action to allow
Return values
nullallowAll()
public
allowAll() : void
allowsAll()
public
allowsAll() : bool
Return values
boolauthenticate()
public
authenticate(IRequest $request, IRoute $route) : bool
Parameters
Tags
Return values
booldeny()
Denies public access to a controllers's action
public
deny(string $action) : null
Parameters
- $action : string
-
The action to deny
Return values
nullextends()
public
extends(ReflectionClass $reflector) : bool
Parameters
- $reflector : ReflectionClass
Return values
boolgetReflection()
public
getReflection() : ReflectionClass
Return values
ReflectionClassgetUser()
public
getUser() : IUser
Return values
IUserisAllowed()
Determines if an action is publicly accessible by this authenticator's controller.
public
isAllowed(string $action) : bool
Parameters
- $action : string
Return values
bool —TRUE if the action is publicly accessible, FALSE otherwise
setController()
public
setController(IController $controller) : void
Parameters
- $controller : IController
setUser()
public
setUser(IUser $user) : void
Parameters
- $user : IUser
init()
protected
init() : null