Documentation

Webhook_Controller extends Core_Servant_Properties
in package

Webhook_Controller.

Tags
subpackage

Webhook

version
7.x
author

Hostmake LLC

copyright

© 2005-2022 ООО "Хостмэйк" (Hostmake LLC), http://www.hostcms.ru

Table of Contents

$_allowedProperties  : array<string|int, mixed>
Allowed object properties
$_cacheNotify  : array<string|int, mixed>
$_propertiesValues  : array<string|int, mixed>
Properties values
$_unlimitedProperties  : bool
Object has unlimited number of properties
__construct()  : mixed
Constructor.
addAllowedProperties()  : self
Add additional allowed properties
addAllowedProperty()  : self
Add additional allowed property
createToken()  : string
Generate token
getEvents()  : array<string|int, mixed>
Get webhook events list
notify()  : array<string|int, mixed>
Call webhooks
set()  : self
Run when writing data to inaccessible properties
setUnlimitedProperties()  : self
Set unlimitedProperties

Properties

$_allowedProperties

Allowed object properties

protected array<string|int, mixed> $_allowedProperties = array()

$_cacheNotify

protected static array<string|int, mixed> $_cacheNotify = array()

$_propertiesValues

Properties values

protected array<string|int, mixed> $_propertiesValues = array()

$_unlimitedProperties

Object has unlimited number of properties

protected bool $_unlimitedProperties = \FALSE

Methods

__construct()

Constructor.

public __construct() : mixed
Return values
mixed

addAllowedProperties()

Add additional allowed properties

public addAllowedProperties(array<string|int, mixed> $array) : self
Parameters
$array : array<string|int, mixed>

array of properties' names

Return values
self

addAllowedProperty()

Add additional allowed property

public addAllowedProperty(string $property) : self
Parameters
$property : string

property name

Return values
self

createToken()

Generate token

public static createToken([mixed $bytes = 16 ]) : string
Parameters
$bytes : mixed = 16
Return values
string

getEvents()

Get webhook events list

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

notify()

Call webhooks

public static notify(mixed $eventName, mixed $object) : array<string|int, mixed>
Parameters
$eventName : mixed
$object : mixed
Return values
array<string|int, mixed>

set()

Run when writing data to inaccessible properties

public set(string $property, string $value) : self
Parameters
$property : string

property name

$value : string

property value

Return values
self

setUnlimitedProperties()

Set unlimitedProperties

public setUnlimitedProperties([bool $value = TRUE ]) : self
Parameters
$value : bool = TRUE

default TRUR

Return values
self

Search results