ClassUtility

ClassUtility class.

author

Arno Dudek

Methods

Create an instance of an class or return it if it's declared as SingletonInterface.

makeInstance(string $className) : mixed
static
throws

Arguments

$className

string

Response

mixed

Match the values of an array to an object.

setPropertiesFromArray(mixed $object, array $options) : void
static

Arguments

$object

mixed

$options

array

Set object property.

setProperty(mixed $object, mixed $propertyName, mixed $propertyValue) : void
static
throws

Arguments

$object

mixed

$propertyName

mixed

$propertyValue

mixed

Check if a property exists.

propertyExists(mixed $object, mixed $propertyName) : void
static

Arguments

$object

mixed

$propertyName

mixed

Unset a property.

unsetProperty(mixed $object, mixed $propertyName) : void
static
throws

Arguments

$object

mixed

$propertyName

mixed

Get a property's value.

getProperty(mixed $object, mixed $propertyName) : string
static
throws

Arguments

$object

mixed

$propertyName

mixed

Response

string

Check if a method exists.

methodExists(mixed $object, string $methodName, boolean $strict = TRUE) : void
static

Arguments

$object

mixed

$methodName

string

$strict

boolean

Call a method of an object.

callMethod(array $callback, array $arguments) : void
static
throws

Arguments

$callback

array

$arguments

array

Properties

singletonInstances

singletonInstances : array
static
var

Type(s)

array