Property | Type | Description | |
---|---|---|---|
$closure | Closure | The Closure instance. | |
$code | string | The code contained by the Closure. | |
$reflection | ReflectionFunction | The ReflectionFunction instance of the Closure. |
Method | Description | |
---|---|---|
__construct ( Closure $closure ) : void | Create a new serializable Closure instance. | |
__invoke ( ) : mixed | Invoke the contained Closure. | |
getClosure ( ) : Closure | Get the unserialized Closure instance. | |
getCode ( ) : string | Get the code for the Closure. | |
getVariables ( ) : array | Get the variables used by the Closure. | |
serialize ( ) : string | Serialize the Closure instance. | |
unserialize ( string $serialized ) : void | Unserialize the Closure instance. |
Method | Description | |
---|---|---|
getCodeFromFile ( ) : string | Extract the code from the Closure's file. | |
getFile ( ) : SplFileObject | Get an SplObjectFile object at the starting line of the Closure. | |
getUseClauseVariables ( ) : array | Get the variables from the "use" clause. | |
getUseIndex ( ) : integer | Get the index location of the "use" clause. |
public __construct ( Closure $closure ) : void | ||
$closure | Closure | |
return | void |
public getClosure ( ) : Closure | ||
return | Closure |
protected getCodeFromFile ( ) : string | ||
return | string |
protected getFile ( ) : SplFileObject | ||
return | SplFileObject |
protected getUseClauseVariables ( ) : array | ||
return | array |
protected getUseIndex ( ) : integer | ||
return | integer |
public getVariables ( ) : array | ||
return | array |
public unserialize ( string $serialized ) : void | ||
$serialized | string | |
return | void |