Native
in package
implements
Serializable
Table of Contents
Interfaces
Constants
- ARRAY_RECURSIVE_KEY = 'LARAVEL_SERIALIZABLE_RECURSIVE_KEY'
- The "key" that marks an array as recursive.
Properties
- $resolveUseVariables : Closure|null
- Resolve the use variables after unserialization.
- $transformUseVariables : Closure|null
- Transform the use variables before serialization.
- $closure : Closure
- The closure to be serialized/unserialized.
- $code : array<string|int, mixed>|null
- The closure's code.
- $reference : string
- The closure's reference.
- $reflector : ReflectionClosure|null
- The closure's reflection.
- $scope : ClosureScope|null
- The closure's scope.
Methods
- __construct() : void
- Creates a new serializable closure instance.
- __invoke() : mixed
- Resolve the closure with the given arguments.
- __serialize() : array<string|int, mixed>
- Get the serializable representation of the closure.
- __unserialize() : void
- Restore the closure after serialization.
- getClosure() : Closure
- Gets the closure.
- getReflector() : ReflectionClosure
- Gets the closure's reflector.
- wrapClosures() : void
- Ensures the given closures are serializable.
- mapByReference() : void
- Internal method used to map closures by reference.
- mapPointers() : void
- Internal method used to map closure pointers.
Constants
ARRAY_RECURSIVE_KEY
The "key" that marks an array as recursive.
public
mixed
ARRAY_RECURSIVE_KEY
= 'LARAVEL_SERIALIZABLE_RECURSIVE_KEY'
Properties
$resolveUseVariables
Resolve the use variables after unserialization.
public
static Closure|null
$resolveUseVariables
$transformUseVariables
Transform the use variables before serialization.
public
static Closure|null
$transformUseVariables
$closure
The closure to be serialized/unserialized.
protected
Closure
$closure
$code
The closure's code.
protected
array<string|int, mixed>|null
$code
$reference
The closure's reference.
protected
string
$reference
$reflector
The closure's reflection.
protected
ReflectionClosure|null
$reflector
$scope
The closure's scope.
protected
ClosureScope|null
$scope
Methods
__construct()
Creates a new serializable closure instance.
public
__construct(Closure $closure) : void
Parameters
- $closure : Closure
__invoke()
Resolve the closure with the given arguments.
public
__invoke() : mixed
__serialize()
Get the serializable representation of the closure.
public
__serialize() : array<string|int, mixed>
Return values
array<string|int, mixed>__unserialize()
Restore the closure after serialization.
public
__unserialize(array<string|int, mixed> $data) : void
Parameters
- $data : array<string|int, mixed>
getClosure()
Gets the closure.
public
getClosure() : Closure
Return values
ClosuregetReflector()
Gets the closure's reflector.
public
getReflector() : ReflectionClosure
Return values
ReflectionClosurewrapClosures()
Ensures the given closures are serializable.
public
static wrapClosures(mixed &$data, ClosureScope $storage) : void
Parameters
- $data : mixed
- $storage : ClosureScope
mapByReference()
Internal method used to map closures by reference.
protected
mapByReference(mixed &$data) : void
Parameters
- $data : mixed
mapPointers()
Internal method used to map closure pointers.
protected
mapPointers(mixed &$data) : void
Parameters
- $data : mixed