Documentation

CallbackType
in package

Table of Contents

$parameters  : array<string|int, ParameterType>
$returnType  : ReturnType
__construct()  : mixed
__toString()  : string
createFromCallable()  : CallbackType
isSatisfiedBy()  : bool
reflectCallable()  : ReflectionFunction|ReflectionMethod
Given a callable, create the appropriate reflection

Properties

Methods

__toString()

public __toString() : string
Return values
string

createFromCallable()

public static createFromCallable(callable $callable[, int $flags = ParameterType::CONTRAVARIANT | ReturnType::COVARIANT ]) : CallbackType
Parameters
$callable : callable
$flags : int = ParameterType::CONTRAVARIANT | ReturnType::COVARIANT
Tags
throws
InvalidCallbackException
Return values
CallbackType

isSatisfiedBy()

public isSatisfiedBy(callable $callable) : bool
Parameters
$callable : callable
Return values
bool

reflectCallable()

Given a callable, create the appropriate reflection

private static reflectCallable(callable $target) : ReflectionFunction|ReflectionMethod

This will accept things the PHP would fail to invoke due to scoping, but we can reflect them anyway. Do not add a callable type-hint or this behaviour will break!

Parameters
$target : callable
Tags
throws
ReflectionException
Return values
ReflectionFunction|ReflectionMethod

Search results