Util

class Util (View source)

Methods

static array arrayWrap(mixed $value)

If the given value is not an array and not null, wrap it in one.

static mixed unwrapIfClosure(mixed $value)

Return the default value of the given value.

static string|null getParameterClassName(ReflectionParameter $parameter)

Get the class name of the given parameter's type, if possible.

Details

static array arrayWrap(mixed $value)

If the given value is not an array and not null, wrap it in one.

From Arr::wrap() in Illuminate\Support.

Parameters

mixed $value

Return Value

array

static mixed unwrapIfClosure(mixed $value)

Return the default value of the given value.

From global value() helper in Illuminate\Support.

Parameters

mixed $value

Return Value

mixed

static string|null getParameterClassName(ReflectionParameter $parameter)

Get the class name of the given parameter's type, if possible.

From Reflector::getParameterClassName() in Illuminate\Support.

Parameters

ReflectionParameter $parameter

Return Value

string|null

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/7.x/Illuminate/Container/Util.html