1 | <?php |
||
26 | class ActiveModel extends LaravelModel |
||
27 | { |
||
28 | /** |
||
29 | * Special function for locale stored attributes under serialization. |
||
30 | * @param string $attribute |
||
31 | * @return array|null|string |
||
32 | */ |
||
33 | public function getLocaled($attribute) |
||
41 | |||
42 | /** |
||
43 | * Set model attribute. Extend laravel attribute casting mutators by serialized array |
||
44 | * @param string $key |
||
45 | * @param mixed $value |
||
46 | * @return LaravelModel |
||
47 | */ |
||
48 | public function setAttribute($key, $value) |
||
55 | |||
56 | /** |
||
57 | * Cast model attribute. Extend laravel attribute casting mutators by serialized array |
||
58 | * @param string $key |
||
59 | * @param mixed $value |
||
60 | * @return mixed |
||
61 | */ |
||
62 | protected function castAttribute($key, $value) |
||
74 | |||
75 | /** |
||
76 | * Check if key is castable to be serialized |
||
77 | * @param string $key |
||
78 | * @return bool |
||
79 | */ |
||
80 | public function isSerializeCastable($key) |
||
84 | |||
85 | /** |
||
86 | * Serialize value |
||
87 | * @param $value |
||
88 | * @return Serialize |
||
89 | */ |
||
90 | public function asSerialize($value) |
||
94 | |||
95 | /** |
||
96 | * Unserialize value |
||
97 | * @param $value |
||
98 | * @return mixed |
||
99 | */ |
||
100 | public function fromSerialize($value) |
||
104 | } |