Utility/ReflectionUtil.phpView Source

Show: PublicProtectedPrivateinherited
Table of Contents
Package
Default  

\ReflectionUtil

Package: Default
Class ReflectionUtil to convert an array to an WehbooksEvent Object

Methods

methodpublicassignValue( $object,  $key,  $value) : void
static

Given the class name, find the setter method for the key.

Parameters
NameTypeDescription
$object

The class that contains the setter method

$key

The name of the setter

$value

The value to be assigned to the setter

methodpublicconstructObjectFromWebhooksArray( $array,  $arrayContainerClassName) : null
static

Pre-assumption: the input array must be a map at the beginning, no matter it is at beginning or at a recursive call. Otherwise, the reflection class won't know what the object name is for the list.

Parameters
NameTypeDescription
$array

The object in array format

$arrayContainerClassName

The class that contains the array

Returns
TypeDescription
null
methodpublicisValidWebhooksClass( $className, null $classCollection = null) : null | string
static

When given a WehbooksService name, check if the given class name is defined on the WehbooksService directory

Parameters
NameTypeDescription
$className

The object name that belongs to WebhooksService

$classCollectionnull

Default to be null. User can choose to pass their own collection

Returns
TypeDescription
null | stringIf the class name can be found in Webhooks Service, return the name; otherwise, return null.
methodpublicloadWebServicesClassAndReturnNames( $dir = null) : array
static

Get all WebhooksService Class under WebhooksService directory

Pre-assumption: the WebhooksService dir is at the top layer of the SDK class.
Parameters
NameTypeDescription
$dir
Returns
TypeDescription
array
Documentation was generated by phpDocumentor 2.8.5.