class ObjectMixin

deprecated

Nette\Object behaviour mixin.

Methods

static 
strictGet($class, $name)

No description

static 
strictSet($class, $name)

No description

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

No description

static 
strictStaticCall($class, $method)

No description

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
getMagicProperties($class)

Returns array of magic properties defined by annotation @property.

static 
getMagicProperty($class, $name)

No description

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 array
getExtensionMethods($class)

Returns extension methods.

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

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

static 
hasProperty($class, $name)

Checks if the public non-static property exists.

static array
getMethods($class)

Returns array of public (static, non-static and magic) methods.

static 
getSource()

No description

Details

at line 32
static strictGet($class, $name)

No description

Parameters

$class
$name

Exceptions

MemberAccessException

at line 46
static strictSet($class, $name)

No description

Parameters

$class
$name

Exceptions

MemberAccessException

at line 60
static strictCall($class, $method, $additionalMethods = [])

No description

Parameters

$class
$method
$additionalMethods

Exceptions

MemberAccessException

at line 78
static strictStaticCall($class, $method)

No description

Parameters

$class
$method

Exceptions

MemberAccessException

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

__call() implementation.

Parameters

$_this
$name
$args

Return Value

mixed

Exceptions

MemberAccessException

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

__callStatic() implementation.

Parameters

$class
$method
$args

Return Value

void

Exceptions

MemberAccessException

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

__get() implementation.

Parameters

$_this
$name

Return Value

mixed

property value

Exceptions

MemberAccessException

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

__set() implementation.

Parameters

$_this
$name
$value

Return Value

void

Exceptions

MemberAccessException

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

__unset() implementation.

Parameters

$_this
$name

Return Value

void

Exceptions

MemberAccessException

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

__isset() implementation.

Parameters

$_this
$name

Return Value

bool

at line 274
static array getMagicProperties($class)

Returns array of magic properties defined by annotation @property.

Parameters

$class

Return Value

array

of [name => bit mask]

at line 315
static getMagicProperty($class, $name)

internal  
 

No description

Parameters

$class
$name

at line 329
static array getMagicMethods($class)

Returns array of magic methods defined by annotation @method.

Parameters

$class

Return Value

array

at line 369
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 441
static void setExtensionMethod($class, $name, $callback)

Adds a method to class.

Parameters

$class
$name
$callback

Return Value

void

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

Returns extension method.

Parameters

$class
$name

Return Value

mixed

at line 477
static array getExtensionMethods($class)

Returns extension methods.

Parameters

$class

Return Value

array

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

internal  
 

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

Parameters

array $possibilities
$value

Return Value

string|null

at line 535
static hasProperty($class, $name)

internal  
 

Checks if the public non-static property exists.

Parameters

$class
$name

at line 558
static array getMethods($class)

internal  
 

Returns array of public (static, non-static and magic) methods.

Parameters

$class

Return Value

array

at line 572
static getSource()

internal  
 

No description

Traits

Static class.