ReflectsClosures

trait ReflectsClosures (View source)

Methods

array closureParameterTypes(Closure $closure)

Get the class names / types of the parameters of the given Closure.

string firstClosureParameterType(Closure $closure)

Get the class name of the first parameter of the given Closure.

Details

protected array closureParameterTypes(Closure $closure)

Get the class names / types of the parameters of the given Closure.

Parameters

Closure $closure

Return Value

array

Exceptions

ReflectionException

protected string firstClosureParameterType(Closure $closure)

Get the class name of the first parameter of the given Closure.

Parameters

Closure $closure

Return Value

string

Exceptions

RuntimeException

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/8.x/Illuminate/Support/Traits/ReflectsClosures.html