class ContainerUtil

Methods

static callable
wrapCallback(callable|string $callback, Container $container)

<p>Wraps a callback so that string-based invokable classes get resolved only when actually used.</p>

Details

static callable wrapCallback(callable|string $callback, Container $container)

<p>Wraps a callback so that string-based invokable classes get resolved only when actually used.</p>

Parameters

callable|string $callback <p>: A callable, global function, or a ::class attribute of an invokable class</p>
Container $container

Return Value

callable