프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$bindingSupported | Indicates is closures can be bound to objects | ||
$closure | Wrapped closure | ||
$code | Used on unserializations to hold variables | ||
$context | Context of closure, used in serialization | ||
$deserialized | Unserialized closures | ||
$isBound | Indicates if closure is bound to an object | ||
$reference | Used to fix serialization in PHP 5.3 | ||
$reflector | A reflection instance for closure | ||
$scope | Closure scope | ||
$serializeThis | Indicates if closure must be serialized with bounded object | ||
$unserializations | Number of unserializations in progress |
메소드 | 설명 | |
---|---|---|
__construct ( Closure $closure, boolean $serializeThis = false ) | Constructor | |
__invoke ( ) | Implementation of magic method __invoke() | |
enterContext ( ) | Increments the contex lock counter or creates a new context if none exist | |
exitContext ( ) | Decrements the context lock counter and destroy the context when it reaches to 0 | |
from ( Closure $closure, boolean $serializeThis = false ) : self | Wraps a closure and sets the serialization context (if any) | |
getClosure ( ) : Closure | Get the Closure object | |
getReflector ( ) : |
Get the reflector for closure | |
serialize ( ) : string | Implementation of Serializable::serialize() | |
supportBinding ( ) : boolean | Indicates is closures can be bound to objects | |
unserialize ( string $data ) | Implementation of Serializable::unserialize() | |
unserializeData ( $data ) | Helper method for unserialization |
메소드 | 설명 | |
---|---|---|
getClosurePointer ( ) : Closure | Internal method used to get a reference from closure | |
mapByReference ( &$value ) : mixed | Internal method used to map closures by reference | |
mapPointers ( &$value ) : mixed | Internal method used to map the pointers on unserialization | |
unserializePHP53 ( &$data ) | Internal method used to unserialize closures in PHP 5.3 |
public __construct ( Closure $closure, boolean $serializeThis = false ) | ||
$closure | Closure | Closure you want to serialize |
$serializeThis | boolean | - Obsolete |
public static enterContext ( ) |
public static exitContext ( ) |
public getClosure ( ) : Closure | ||
리턴 | Closure | The wrapped closure |
protected getClosurePointer ( ) : Closure | ||
리턴 | Closure | A pointer to closure |
public getReflector ( ) : |
||
리턴 |
protected mapByReference ( &$value ) : mixed | ||
리턴 | mixed | The mapped values |
protected mapPointers ( &$value ) : mixed | ||
리턴 | mixed | Mapped pointers |
public static supportBinding ( ) : boolean | ||
리턴 | boolean |
public unserialize ( string $data ) | ||
$data | string | Serialized data |
public static unserializeData ( $data ) |
protected unserializePHP53 ( &$data ) |
protected static $bindingSupported |
protected $serializeThis |