Serialization
Helper class for interacting with SerializableClosures
class Winter\Storm\Support\Serialization
Methods
public static unwrapClosure (SerializableClosure | mixed $callable) : Closure | mixed
If the provided argument is an instance of SerializableClosure it gets unwrapped and the original closure returned, which is the recommended behaviour. Otherwise the provided value is returned unmodified
Parameters
Property | Type | Description |
---|---|---|
$callable | SerializableClosure | mixed |
SerializableClosure | mixed
|
Returns
Closure | mixed
public static wrapClosure (Closure | mixed $callable) : SerializableClosure | mixed
Wraps a closure in a SerializableClosure, returns the provided object if it's not a closure.
Parameters
Property | Type | Description |
---|---|---|
$callable | Closure | mixed |
Closure | mixed
provided callable to be wrapped if it's a closure |
Returns
SerializableClosure | mixed
← Previous page
Winter\Storm\Support\ModuleServiceProvider
Next page →
Winter\Storm\Support\ServiceProvider
Copyright © 2024 Winter CMS