Documentation

WhitelistSubscriber
in package
implements EventSubscriberInterface

The WhitelistSubscriber listens to API requests and matches them against a whitelist of allowed API calls. If an API call does NOT appear in the whitelist, then it generates an error.

Tags
copyright

CiviCRM LLC https://civicrm.org/licensing

Table of Contents

Interfaces

EventSubscriberInterface

Properties

$activeRules  : array<string|int, mixed>
Array (scalar $reqId => WhitelistRule $rule).
$rules  : array<string|int, mixed>
Array(WhitelistRule).

Methods

__construct()  : mixed
getSubscribedEvents()  : array<string|int, mixed>
onApiAuthorize()  : mixed
Determine which, if any, whitelist rules apply this request.
onApiRespond()  : mixed
Apply any filtering rules based on the chosen whitelist rule.

Properties

$activeRules

Array (scalar $reqId => WhitelistRule $rule).

protected array<string|int, mixed> $activeRules

Methods

__construct()

public __construct(array<string|int, mixed> $rules) : mixed
Parameters
$rules : array<string|int, mixed>

Array of WhitelistRule.

Tags
see
WhitelistRule
throws
CRM_Core_Exception

getSubscribedEvents()

public static getSubscribedEvents() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results