1 | <?php |
||
19 | trait ProviderAttributesTrait |
||
20 | { |
||
21 | use ProviderClientAttributesTrait; |
||
22 | |||
23 | /** |
||
24 | * @var bool|null The enabled state |
||
25 | */ |
||
26 | public $enabled = true; |
||
27 | |||
28 | /** |
||
29 | * @var int|int[]|false|null The model ID(s). Prefix IDs with "not " to exclude them. |
||
30 | */ |
||
31 | public $id; |
||
32 | |||
33 | /** |
||
34 | * @var string|string[]|null The provider name(s). Prefix IDs with "not " to exclude them. |
||
35 | */ |
||
36 | public $name; |
||
37 | |||
38 | /** |
||
39 | * @var string|string[]|null The provider handle(s). Prefix IDs with "not " to exclude them. |
||
40 | */ |
||
41 | public $handle; |
||
42 | |||
43 | /** |
||
44 | * @var string|string[]|null The provider classes(s). Prefix IDs with "not " to exclude them. |
||
45 | */ |
||
46 | public $class; |
||
47 | |||
48 | /** |
||
49 | * @param $enabled |
||
50 | * @return $this |
||
51 | */ |
||
52 | public function enabled($enabled) |
||
53 | { |
||
54 | $this->enabled = $enabled; |
||
55 | return $this; |
||
56 | } |
||
57 | |||
58 | /** |
||
59 | * @param $id |
||
60 | * @return $this |
||
61 | */ |
||
62 | public function id($id) |
||
63 | { |
||
64 | $this->id = $id; |
||
65 | return $this; |
||
66 | } |
||
67 | |||
68 | /** |
||
69 | * @param $name |
||
70 | * @return $this |
||
71 | */ |
||
72 | public function name($name) |
||
73 | { |
||
74 | $this->name = $name; |
||
75 | return $this; |
||
76 | } |
||
77 | |||
78 | /** |
||
79 | * @param $handle |
||
80 | * @return $this |
||
81 | */ |
||
82 | public function handle($handle) |
||
83 | { |
||
84 | $this->handle = $handle; |
||
85 | return $this; |
||
86 | } |
||
87 | |||
88 | /** |
||
89 | * @param $class |
||
90 | * @return $this |
||
91 | */ |
||
92 | public function class($class) |
||
97 | |||
98 | /** |
||
99 | * @throws QueryAbortedException |
||
100 | */ |
||
101 | protected function applyProviderConditions() |
||
122 | } |
||
123 |