ApiRoot
extends ApiRoot
in package
Uses
ExtensionsTrait
Class created by Core/Base/PluginDeploy
Tags
Table of Contents
- API_VERSION = 3
- INCIDENT_EXPIRATION_TIME = 600
- IP_LIST = 'api-ip-list'
- MAX_INCIDENT_COUNT = 5
- $apiKey : ApiKey
- $extensions : array<string|int, mixed>
- Stores class extensions.
- $request : Request
- $response : Response
- $url : string
- __call() : mixed
- Executes the first matched extension.
- __construct() : mixed
- addExtension() : mixed
- getPageData() : array<string|int, mixed>
- pipe() : mixed
- pipeFalse() : bool
- run() : void
- exposeResources() : void
- getResourcesMap() : array<string|int, mixed>
- getUriParam() : string
- runResource() : void
- clientHasManyIncidents() : bool
- getIpList() : array<string|int, mixed>
- isAllowed() : bool
- saveIncident() : void
- validateApiToken() : bool
Constants
API_VERSION
public
mixed
API_VERSION
= 3
INCIDENT_EXPIRATION_TIME
public
mixed
INCIDENT_EXPIRATION_TIME
= 600
IP_LIST
public
mixed
IP_LIST
= 'api-ip-list'
MAX_INCIDENT_COUNT
public
mixed
MAX_INCIDENT_COUNT
= 5
Properties
$apiKey
protected
ApiKey
$apiKey
$extensions
Stores class extensions.
protected
static array<string|int, mixed>
$extensions
= []
$request
protected
Request
$request
$response
protected
Response
$response
$url
protected
string
$url
Methods
__call()
Executes the first matched extension.
public
__call(string $name[, array<string|int, mixed> $arguments = [] ]) : mixed
Parameters
- $name : string
- $arguments : array<string|int, mixed> = []
Tags
Return values
mixed —__construct()
public
__construct(string $className[, string $url = '' ]) : mixed
Parameters
- $className : string
- $url : string = ''
Return values
mixed —addExtension()
public
static addExtension(mixed $extension) : mixed
Parameters
- $extension : mixed
Return values
mixed —getPageData()
public
getPageData() : array<string|int, mixed>
Return values
array<string|int, mixed> —pipe()
public
pipe(string $name, array<string|int, mixed> ...$arguments) : mixed
Parameters
- $name : string
- $arguments : array<string|int, mixed>
Return values
mixed —pipeFalse()
public
pipeFalse(string $name, array<string|int, mixed> ...$arguments) : bool
Parameters
- $name : string
- $arguments : array<string|int, mixed>
Return values
bool —run()
public
run() : void
Return values
void —exposeResources()
protected
exposeResources(array<string|int, mixed> &$map) : void
Parameters
- $map : array<string|int, mixed>
Return values
void —getResourcesMap()
protected
getResourcesMap() : array<string|int, mixed>
Return values
array<string|int, mixed> —getUriParam()
protected
getUriParam(string $num) : string
Parameters
- $num : string
Return values
string —runResource()
protected
abstract runResource() : void
Return values
void —clientHasManyIncidents()
private
clientHasManyIncidents() : bool
Return values
bool —getIpList()
private
getIpList() : array<string|int, mixed>
Return values
array<string|int, mixed> —isAllowed()
private
isAllowed(string $resource) : bool
Parameters
- $resource : string
Return values
bool —saveIncident()
private
saveIncident() : void
Return values
void —validateApiToken()
private
validateApiToken(string $token) : bool
Parameters
- $token : string