class ObjectMixin

Nette\Object behaviour mixin.

Methods

__construct()

Static class - cannot be instantiated.

static mixed
call($_this, $name, $args)

__call() implementation.

static void
callStatic($class, $method, $args)

__callStatic() implementation.

static mixed
get($_this, $name)

__get() implementation.

static void
set($_this, $name, $value)

__set() implementation.

static void
remove($_this, $name)

__unset() implementation.

static bool
has($_this, $name)

__isset() implementation.

static array
getMagicMethods($class)

Returns array of magic methods defined by annotation @method.

static bool
checkType($val, $type)

Finds whether a variable is of expected type and do non-data-loss conversion.

static void
setExtensionMethod($class, $name, $callback)

Adds a method to class.

static mixed
getExtensionMethod($class, $name)

Returns extension method.

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

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

Details

at line 34
final __construct()

Static class - cannot be instantiated.

at line 48
static mixed call($_this, $name, $args)

__call() implementation.

Parameters

$_this
$name
$args

Return Value

mixed

Exceptions

MemberAccessException

at line 109
static void callStatic($class, $method, $args)

__callStatic() implementation.

Parameters

$class
$method
$args

Return Value

void

Exceptions

MemberAccessException

at line 122
static mixed get($_this, $name)

__get() implementation.

Parameters

$_this
$name

Return Value

mixed

property value

Exceptions

MemberAccessException

at line 167
static void set($_this, $name, $value)

__set() implementation.

Parameters

$_this
$name
$value

Return Value

void

Exceptions

MemberAccessException

at line 197
static void remove($_this, $name)

__unset() implementation.

Parameters

$_this
$name

Return Value

void

Exceptions

MemberAccessException

at line 212
static bool has($_this, $name)

__isset() implementation.

Parameters

$_this
$name

Return Value

bool

at line 261
static array getMagicMethods($class)

Returns array of magic methods defined by annotation @method.

Parameters

$class

Return Value

array

at line 299
static bool checkType($val, $type)

internal  
 

Finds whether a variable is of expected type and do non-data-loss conversion.

Parameters

$val
$type

Return Value

bool

at line 368
static void setExtensionMethod($class, $name, $callback)

Adds a method to class.

Parameters

$class
$name
$callback

Return Value

void

at line 382
static mixed getExtensionMethod($class, $name)

Returns extension method.

Parameters

$class
$name

Return Value

mixed

at line 404
static string|null getSuggestion(array $items, $value)

internal  
 

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

Parameters

array $items
$value

Return Value

string|null