1 | <?php |
||
34 | class MaterialComponent extends ComponentAbstract implements MaterialCMPTIF |
||
35 | { |
||
36 | private $shaderObj; |
||
37 | |||
38 | /** |
||
39 | * Initialize Component |
||
40 | * |
||
41 | * {@inheritdoc} |
||
42 | * |
||
43 | * @return bool |
||
44 | */ |
||
45 | 26 | public function initializeComponent(): bool |
|
50 | |||
51 | /** |
||
52 | * Return DOM attribute contents |
||
53 | * |
||
54 | * @return string |
||
55 | */ |
||
56 | 7 | public function getDomAttributeString(): string |
|
61 | |||
62 | /** |
||
63 | * Call passes all calls to no existing methods to self::methodProvider |
||
64 | * |
||
65 | * @param string $method |
||
66 | * @param array $args |
||
67 | * @throws InvalidComponentMethodException |
||
68 | */ |
||
69 | 12 | public function __call(string $method, $args) |
|
87 | |||
88 | /** |
||
89 | * Material Shader |
||
90 | * |
||
91 | * {@inheritdoc} |
||
92 | * |
||
93 | * @param null|string $shader |
||
94 | * @throws BadShaderCallException |
||
95 | * @return object|null |
||
|
|||
96 | */ |
||
97 | 21 | public function shader(string $shader = null) |
|
112 | |||
113 | /** |
||
114 | * opacity |
||
115 | * |
||
116 | * {@inheritdoc} |
||
117 | * |
||
118 | * @param float $opacity |
||
119 | * @return MaterialCMPTIF |
||
120 | */ |
||
121 | 11 | public function opacity(float $opacity = 1.0): MaterialCMPTIF |
|
126 | |||
127 | /** |
||
128 | * transparent |
||
129 | * |
||
130 | * {@inheritdoc} |
||
131 | * |
||
132 | * @param bool $transparent |
||
133 | * @return MaterialCMPTIF |
||
134 | */ |
||
135 | 10 | public function transparent(bool $transparent = false): MaterialCMPTIF |
|
140 | |||
141 | /** |
||
142 | * depthTest |
||
143 | * |
||
144 | * {@inheritdoc} |
||
145 | * |
||
146 | * @param bool $depth_test |
||
147 | * @return MaterialCMPTIF |
||
148 | */ |
||
149 | 1 | public function depthTest(bool $depth_test = true): MaterialCMPTIF |
|
154 | |||
155 | /** |
||
156 | * side |
||
157 | * |
||
158 | * {@inheritdoc} |
||
159 | * |
||
160 | * @param string $side |
||
161 | * @return MaterialCMPTIF |
||
162 | */ |
||
163 | 7 | public function side(string $side = 'front'): MaterialCMPTIF |
|
168 | |||
169 | /** |
||
170 | * Do not apply fog to certain entities, we can disable fog for certain materials. |
||
171 | * |
||
172 | * @param bool $fog |
||
173 | * @return MaterialCMPTIF |
||
174 | */ |
||
175 | 1 | public function fog(bool $fog = true): MaterialCMPTIF |
|
180 | |||
181 | /** |
||
182 | * Prepare Shader attributes |
||
183 | * |
||
184 | * @return void |
||
185 | */ |
||
186 | 7 | private function prepareShader() |
|
192 | } |
||
193 |
This check looks for the generic type
array
as a return type and suggests a more specific type. This type is inferred from the actual code.