File tree Expand file tree Collapse file tree 1 file changed +0
-38
lines changed Expand file tree Collapse file tree 1 file changed +0
-38
lines changed Original file line number Diff line number Diff line change @@ -9,44 +9,6 @@ trait SerializesModels
9
9
{
10
10
use SerializesAndRestoresModelIdentifiers;
11
11
12
- /**
13
- * Prepare the instance for serialization.
14
- *
15
- * @return array
16
- */
17
- public function __sleep ()
18
- {
19
- $ properties = (new ReflectionClass ($ this ))->getProperties ();
20
-
21
- foreach ($ properties as $ property ) {
22
- $ property ->setValue ($ this , $ this ->getSerializedPropertyValue (
23
- $ this ->getPropertyValue ($ property )
24
- ));
25
- }
26
-
27
- return array_values (array_filter (array_map (function ($ p ) {
28
- return $ p ->isStatic () ? null : $ p ->getName ();
29
- }, $ properties )));
30
- }
31
-
32
- /**
33
- * Restore the model after serialization.
34
- *
35
- * @return void
36
- */
37
- public function __wakeup ()
38
- {
39
- foreach ((new ReflectionClass ($ this ))->getProperties () as $ property ) {
40
- if ($ property ->isStatic ()) {
41
- continue ;
42
- }
43
-
44
- $ property ->setValue ($ this , $ this ->getRestoredPropertyValue (
45
- $ this ->getPropertyValue ($ property )
46
- ));
47
- }
48
- }
49
-
50
12
/**
51
13
* Prepare the instance values for serialization.
52
14
*
You can’t perform that action at this time.
0 commit comments