Documentation

ApiKeyEventListener extends DefaultEventListener

EventListener for ApiKeys

Tags
copyright

Cloudrexx AG

author

Sam Hawkes info@cloudrexx.com

subpackage

core_modules_dataaccess

version
5.0.0

Table of Contents

Properties

$cx  : Cx

Methods

__construct()  : mixed
getComponent()  : SystemComponentController
Get a component controller object
onEvent()  : mixed
prePersist()  : mixed
Prevent duplicate API keys from being stored
preUpdate()  : mixed
Prevent duplicate API keys from being stored
isAlreadyAnEntryWithThisKey()  : bool
Check if an API key already exists with the given key

Properties

Methods

onEvent()

public onEvent(mixed $eventName, array<string|int, mixed> $eventArgs) : mixed
Parameters
$eventName : mixed
$eventArgs : array<string|int, mixed>

prePersist()

Prevent duplicate API keys from being stored

public prePersist(LifecycleEventArgs $args) : mixed
Parameters
$args : LifecycleEventArgs

contains the entity

Tags
throws
ShinyException

api key already exists

preUpdate()

Prevent duplicate API keys from being stored

public preUpdate(LifecycleEventArgs $args) : mixed
Parameters
$args : LifecycleEventArgs

contains the entity

Tags
throws
ShinyException

api key already exists

isAlreadyAnEntryWithThisKey()

Check if an API key already exists with the given key

protected isAlreadyAnEntryWithThisKey(string $apiKey) : bool
Parameters
$apiKey : string

check if entity with this API key already exists

Return values
bool

if an API key exists


        
On this page

Search results