PHP Class Nette\Utils\Callback

Inheritance: use trait Nette\StaticClass
Datei anzeigen Open project: nette/utils Class Usage Examples

Public Methods

Method Description
check ( $callable, $syntax = FALSE ) : callable
closure ( $callable, $m = NULL ) : Closure
invoke ( $callable, $args ) : mixed Invokes callback.
invokeArgs ( $callable, array $args = [] ) : mixed Invokes callback with an array of parameters.
invokeSafe ( $function, array $args, $onError ) : mixed Invokes internal PHP function with own error handler.
isStatic ( $callable ) : boolean
toReflection ( $callable ) : ReflectionMethod | ReflectionFunction
toString ( $callable ) : string
unwrap ( Closure $closure ) : callable Unwraps closure created by self::closure()

Method Details

check() public static method

public static check ( $callable, $syntax = FALSE ) : callable
return callable

closure() public static method

public static closure ( $callable, $m = NULL ) : Closure
return Closure

invoke() public static method

Invokes callback.
public static invoke ( $callable, $args ) : mixed
return mixed

invokeArgs() public static method

Invokes callback with an array of parameters.
public static invokeArgs ( $callable, array $args = [] ) : mixed
$args array
return mixed

invokeSafe() public static method

Invokes internal PHP function with own error handler.
public static invokeSafe ( $function, array $args, $onError ) : mixed
$args array
return mixed

isStatic() public static method

public static isStatic ( $callable ) : boolean
return boolean

toReflection() public static method

public static toReflection ( $callable ) : ReflectionMethod | ReflectionFunction
return ReflectionMethod | ReflectionFunction

toString() public static method

public static toString ( $callable ) : string
return string

unwrap() public static method

Unwraps closure created by self::closure()
public static unwrap ( Closure $closure ) : callable
$closure Closure
return callable