Menu

## SerializableClosure
in package

SerializableClosure.php : 11

### Table of Contents

#### Properties

$serializable : Serializable
  The closure's serializable.

#### 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.
resolveUseVariablesUsing() : void
  Sets the serializable closure secret key.
setSecretKey() : void
  Sets the serializable closure secret key.
transformUseVariablesUsing() : void
  Sets the serializable closure secret key.
unsigned() : UnsignedSerializableClosure
  Create a new unsigned serializable closure instance.

### Properties

#### $serializable

SerializableClosure.php : 18

The closure's serializable.

`protected Serializable $serializable`

### Methods

#### __construct()

SerializableClosure.php : 26

Creates a new serializable closure instance.

`public __construct(Closure $closure) : void`

##### Parameters

$closure : Closure

#### __invoke()

SerializableClosure.php : 42

Resolve the closure with the given arguments.

`public __invoke() : mixed`

#### __serialize()

SerializableClosure.php : 116

Get the serializable representation of the closure.

`public __serialize() : array<string|int, mixed>`

##### Return values

array<string|int, mixed>

#### __unserialize()

SerializableClosure.php : 131

Restore the closure after serialization.

`public __unserialize(array<string|int, mixed> $data) : void`

##### Parameters

$data : array<string|int, mixed>

##### Tags

throws
  InvalidSignatureException

#### getClosure()

SerializableClosure.php : 56

Gets the closure.

`public getClosure() : Closure`

##### Return values

Closure

#### resolveUseVariablesUsing()

SerializableClosure.php : 106

Sets the serializable closure secret key.

`public static resolveUseVariablesUsing(Closure|null $resolver) : void`

##### Parameters

$resolver : Closure|null

#### setSecretKey()

SerializableClosure.php : 82

Sets the serializable closure secret key.

`public static setSecretKey(string|null $secret) : void`

##### Parameters

$secret : string|null

#### transformUseVariablesUsing()

SerializableClosure.php : 95

Sets the serializable closure secret key.

`public static transformUseVariablesUsing(Closure|null $transformer) : void`

##### Parameters

$transformer : Closure|null

#### unsigned()

SerializableClosure.php : 71

Create a new unsigned serializable closure instance.

`public static unsigned(Closure $closure) : UnsignedSerializableClosure`

##### Parameters

$closure : Closure

##### Return values

UnsignedSerializableClosure

## Search results