class Callback

PHP callable tools.

Methods

static Closure
closure($callable, $m = null)

No description

static mixed
invoke($callable, ...$args) deprecated

Invokes callback.

static mixed
invokeArgs($callable, array $args = []) deprecated

Invokes callback with an array of parameters.

static mixed
invokeSafe($function, array $args, $onError)

Invokes internal PHP function with own error handler.

static callable
check($callable, $syntax = false)

No description

static string
toString($callable)

No description

toReflection($callable)

No description

static bool
isStatic($callable)

No description

static callable
unwrap(Closure $closure)

Unwraps closure created by self::closure()

Details

at line 25
static Closure closure($callable, $m = null)

No description

Parameters

$callable
$m

Return Value

Closure

at line 61
static mixed invoke($callable, ...$args) deprecated

deprecated

Invokes callback.

Parameters

$callable
...$args

Return Value

mixed

at line 73
static mixed invokeArgs($callable, array $args = []) deprecated

deprecated

Invokes callback with an array of parameters.

Parameters

$callable
array $args

Return Value

mixed

at line 85
static mixed invokeSafe($function, array $args, $onError)

Invokes internal PHP function with own error handler.

Parameters

$function
array $args
$onError

Return Value

mixed

at line 115
static callable check($callable, $syntax = false)

No description

Parameters

$callable
$syntax

Return Value

callable

at line 130
static string toString($callable)

No description

Parameters

$callable

Return Value

string

at line 147
static ReflectionMethod|ReflectionFunction toReflection($callable)

No description

Parameters

$callable

Return Value

ReflectionMethod|ReflectionFunction

at line 170
static bool isStatic($callable)

No description

Parameters

$callable

Return Value

bool

at line 181
static callable unwrap(Closure $closure)

internal  
 

Unwraps closure created by self::closure()

Parameters

Closure $closure

Return Value

callable

Traits

Static class.