1 | <?php |
||
8 | trait AttributesVisibility |
||
9 | { |
||
10 | /** |
||
11 | * The shared attributes that should be hidden for serialization. |
||
12 | * |
||
13 | * @var array|null |
||
14 | */ |
||
15 | public static $sharedHidden; |
||
16 | |||
17 | /** |
||
18 | * The shared attributes that should be visible in serialization. |
||
19 | * |
||
20 | * @var array|null |
||
21 | */ |
||
22 | public static $sharedVisible; |
||
23 | |||
24 | /** |
||
25 | * Get the shared hidden attributes. |
||
26 | * |
||
27 | * @return array|null |
||
28 | */ |
||
29 | public static function getSharedHidden() |
||
33 | |||
34 | /** |
||
35 | * Set the shared hidden attributes. |
||
36 | * |
||
37 | * @param array|null $hidden |
||
38 | * @return void |
||
39 | */ |
||
40 | public static function setSharedHidden($hidden) |
||
44 | |||
45 | /** |
||
46 | * Get the shared visible attributes. |
||
47 | * |
||
48 | * @return array|null |
||
49 | */ |
||
50 | public static function getSharedVisible() |
||
54 | |||
55 | /** |
||
56 | * Set the shared visible attributes. |
||
57 | * |
||
58 | * @param array|null $visible |
||
59 | * @return void |
||
60 | */ |
||
61 | public static function setSharedVisible($visible) |
||
65 | |||
66 | /** |
||
67 | * Make all attributes be visible. |
||
68 | * |
||
69 | * @return void |
||
70 | */ |
||
71 | public static function makeAllVisible() |
||
75 | |||
76 | /** |
||
77 | * Restore attributes visibility. |
||
78 | * |
||
79 | * @return void |
||
80 | */ |
||
81 | public static function restoreAttributesVisibility() |
||
85 | |||
86 | /** |
||
87 | * Get the hidden attributes for the model. |
||
88 | * |
||
89 | * @return array |
||
90 | */ |
||
91 | public function getHidden() |
||
99 | |||
100 | /** |
||
101 | * Get the visible attributes for the model. |
||
102 | * |
||
103 | * @return array |
||
104 | */ |
||
105 | public function getVisible() |
||
113 | } |
||
114 |