class ObjectHelpers

Nette\SmartObject helpers.

Traits

Static class.

Methods

static void
strictGet(string $class, string $name)

No description

static void
strictSet(string $class, string $name)

No description

static void
strictCall(string $class, string $method, array $additionalMethods = [])

No description

static void
strictStaticCall(string $class, string $method)

No description

static array
getMagicProperties(string $class)

Returns array of magic properties defined by annotation @property.

static string|null
getSuggestion(array $possibilities, string $value)

Finds the best suggestion (for 8-bit encoding).

static bool|string
hasProperty(string $class, string $name)

Checks if the public non-static property exists.

Details

at line 26
static void strictGet(string $class, string $name)

Parameters

string $class
string $name

Return Value

void

Exceptions

MemberAccessException

at line 40
static void strictSet(string $class, string $name)

Parameters

string $class
string $name

Return Value

void

Exceptions

MemberAccessException

at line 54
static void strictCall(string $class, string $method, array $additionalMethods = [])

Parameters

string $class
string $method
array $additionalMethods

Return Value

void

Exceptions

MemberAccessException

at line 72
static void strictStaticCall(string $class, string $method)

Parameters

string $class
string $method

Return Value

void

Exceptions

MemberAccessException

at line 87
static array getMagicProperties(string $class)

Returns array of magic properties defined by annotation @property.

Parameters

string $class

Return Value

array of [name => bit mask]

at line 132
static string|null getSuggestion(array $possibilities, string $value)

Finds the best suggestion (for 8-bit encoding).

Parameters

array $possibilities
string $value

Return Value

string|null

at line 170
static bool|string hasProperty(string $class, string $name)

Checks if the public non-static property exists.

Parameters

string $class
string $name

Return Value

bool|string returns 'event' if the property exists and has event like name