| 1 | <?php  | 
            ||
| 16 | final class DefaultExclusionData implements ExclusionData  | 
            ||
| 17 | { | 
            ||
| 18 | /**  | 
            ||
| 19 | * If the data is available during serialization or deserialization  | 
            ||
| 20 | *  | 
            ||
| 21 | * @var bool  | 
            ||
| 22 | */  | 
            ||
| 23 | private $serialize;  | 
            ||
| 24 | |||
| 25 | /**  | 
            ||
| 26 | * The object to be serialized or deserialized into  | 
            ||
| 27 | *  | 
            ||
| 28 | * @var object  | 
            ||
| 29 | */  | 
            ||
| 30 | private $data;  | 
            ||
| 31 | |||
| 32 | /**  | 
            ||
| 33 | * The original payload available during deserialization  | 
            ||
| 34 | *  | 
            ||
| 35 | * @var mixed|null  | 
            ||
| 36 | */  | 
            ||
| 37 | private $payload;  | 
            ||
| 38 | |||
| 39 | /**  | 
            ||
| 40 | * Constructor  | 
            ||
| 41 | *  | 
            ||
| 42 | * @param bool $serialize  | 
            ||
| 43 | * @param object $data  | 
            ||
| 44 | * @param mixed|null $payload  | 
            ||
| 45 | */  | 
            ||
| 46 | 4 | public function __construct(bool $serialize, $data, $payload = null)  | 
            |
| 52 | |||
| 53 | /**  | 
            ||
| 54 | * Returns true if the data is available during serialization  | 
            ||
| 55 | *  | 
            ||
| 56 | * @return bool  | 
            ||
| 57 | */  | 
            ||
| 58 | 2 | public function isSerialize(): bool  | 
            |
| 62 | |||
| 63 | /**  | 
            ||
| 64 | * This will either contain a hydrated object during serialization or the instantiated  | 
            ||
| 65 | * object during deserialization. During deserialization, this object will likely be  | 
            ||
| 66 | * empty unless a hydrated object was provided.  | 
            ||
| 67 | *  | 
            ||
| 68 | * @return object  | 
            ||
| 69 | */  | 
            ||
| 70 | 1 | public function getData()  | 
            |
| 74 | |||
| 75 | /**  | 
            ||
| 76 | * During deserialization, this will return the provided json after json_decode. During  | 
            ||
| 77 | * serialization, this will return null  | 
            ||
| 78 | *  | 
            ||
| 79 | * @return mixed|null  | 
            ||
| 80 | */  | 
            ||
| 81 | 1 | public function getDeserializePayload()  | 
            |
| 85 | }  | 
            ||
| 86 |