Documentation

ApiController extends Controller
in package

FinalYes

Controller authentication component. This class authorizes access to an api controller within the framework

Tags
author

Ramone Burrell ramone@ramoneburrell.com

since

Version 0.1.0

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

$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()

$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()

Methods

__callStatic()

public static __callStatic(mixed $method, array<string|int, mixed> $arguments) : mixed
Parameters
$method : mixed
$arguments : array<string|int, 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
null

deny()

Denies public access to a controllers's action

public deny(string $action) : null
Parameters
$action : string

The action to deny

Return values
null

extends()

public extends(ReflectionClass $reflector) : bool
Parameters
$reflector : ReflectionClass
Return values
bool

getReflection()

public getReflection() : ReflectionClass
Return values
ReflectionClass

isAllowed()

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


        
On this page

Search results