1 | <?php |
||
7 | trait HasAttributesTrait |
||
8 | { |
||
9 | protected $attributes = []; |
||
10 | |||
11 | /** |
||
12 | * Set a given log value. |
||
13 | * |
||
14 | * @param array|string $key |
||
15 | * @param mixed $value |
||
16 | * |
||
17 | * @return bool |
||
18 | */ |
||
19 | public function setAttribute($key, $value = null) |
||
28 | |||
29 | /** |
||
30 | * Get the specified log value. |
||
31 | * |
||
32 | * @param null|string $key |
||
33 | * @param mixed $default |
||
34 | * |
||
35 | * @return mixed |
||
36 | */ |
||
37 | public function getAttribute($key = null, $default = null) |
||
41 | |||
42 | /** |
||
43 | * @param string|int $key |
||
44 | * |
||
45 | * @return bool |
||
46 | */ |
||
47 | public function existsAttribute($key) |
||
51 | |||
52 | /** |
||
53 | * @param string|array $keys |
||
54 | * |
||
55 | * @return bool |
||
56 | */ |
||
57 | public function hasAttribute($keys) |
||
61 | } |
||
62 |