PHP Class Nette\Utils\ObjectMixin

Author: David Grudl
Show file Open project: nette/utils Class Usage Examples

Public Methods

Method Description
call ( $_this, $name, $args ) : mixed __call() implementation.
callStatic ( $class, $method, $args ) : void __callStatic() implementation.
checkType ( &$val, $type ) : boolean Finds whether a variable is of expected type and do non-data-loss conversion.
get ( $_this, $name ) : mixed __get() implementation.
getExtensionMethod ( $class, $name ) : mixed Returns extension method.
getExtensionMethods ( $class ) : array Returns extension methods.
getMagicMethods ( $class ) : array Returns array of magic methods defined by annotation @method.
getMagicProperties ( $class ) : array Returns array of magic properties defined by annotation @property.
getMagicProperty ( $class, $name )
getMethods ( $class ) : array Returns array of public (static, non-static and magic) methods.
getSource ( )
getSuggestion ( array $possibilities, $value ) : string | null Finds the best suggestion (for 8-bit encoding).
has ( $_this, $name ) : boolean __isset() implementation.
hasProperty ( $class, $name ) : boolean | 'event' Checks if the public non-static property exists.
remove ( $_this, $name ) : void __unset() implementation.
set ( $_this, $name, $value ) : void __set() implementation.
setExtensionMethod ( $class, $name, $callback ) : void Adds a method to class.
strictCall ( $class, $method, $additionalMethods = [] )
strictGet ( $class, $name )
strictSet ( $class, $name )
strictStaticCall ( $class, $method )

Private Methods

Method Description
parseFullDoc ( ReflectionClass $rc, $pattern )

Method Details

call() public static method

__call() implementation.
public static call ( $_this, $name, $args ) : mixed
return mixed

callStatic() public static method

__callStatic() implementation.
public static callStatic ( $class, $method, $args ) : void
return void

checkType() public static method

Finds whether a variable is of expected type and do non-data-loss conversion.
public static checkType ( &$val, $type ) : boolean
return boolean

get() public static method

__get() implementation.
public static get ( $_this, $name ) : mixed
return mixed property value

getExtensionMethod() public static method

Returns extension method.
public static getExtensionMethod ( $class, $name ) : mixed
return mixed

getExtensionMethods() public static method

Returns extension methods.
public static getExtensionMethods ( $class ) : array
return array

getMagicMethods() public static method

Returns array of magic methods defined by annotation @method.
public static getMagicMethods ( $class ) : array
return array

getMagicProperties() public static method

Returns array of magic properties defined by annotation @property.
public static getMagicProperties ( $class ) : array
return array of [name => bit mask]

getMagicProperty() public static method

public static getMagicProperty ( $class, $name )

getMethods() public static method

Returns array of public (static, non-static and magic) methods.
public static getMethods ( $class ) : array
return array

getSource() public static method

public static getSource ( )

getSuggestion() public static method

Finds the best suggestion (for 8-bit encoding).
public static getSuggestion ( array $possibilities, $value ) : string | null
$possibilities array
return string | null

has() public static method

__isset() implementation.
public static has ( $_this, $name ) : boolean
return boolean

hasProperty() public static method

Checks if the public non-static property exists.
public static hasProperty ( $class, $name ) : boolean | 'event'
return boolean | 'event'

remove() public static method

__unset() implementation.
public static remove ( $_this, $name ) : void
return void

set() public static method

__set() implementation.
public static set ( $_this, $name, $value ) : void
return void

setExtensionMethod() public static method

Adds a method to class.
public static setExtensionMethod ( $class, $name, $callback ) : void
return void

strictCall() public static method

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

strictGet() public static method

public static strictGet ( $class, $name )

strictSet() public static method

public static strictSet ( $class, $name )

strictStaticCall() public static method

public static strictStaticCall ( $class, $method )