1 | <?php |
||
34 | class MaterialComponent extends ComponentAbstract implements MaterialCMPTIF |
||
35 | { |
||
36 | private $shaderObj; |
||
37 | |||
38 | /** |
||
39 | * Initialize Component |
||
40 | * |
||
41 | * {@inheritdoc} |
||
42 | 53 | * |
|
43 | * @return bool |
||
44 | 53 | */ |
|
45 | 53 | public function initializeComponent(): bool |
|
50 | |||
51 | /** |
||
52 | * Return DOM attribute contents |
||
53 | 5 | * |
|
54 | * @return string |
||
55 | 5 | */ |
|
56 | 5 | 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 | 34 | */ |
|
69 | public function __call(string $method, $args) |
||
87 | |||
88 | /** |
||
89 | * Material Shader |
||
90 | * |
||
91 | * {@inheritdoc} |
||
92 | 16 | * |
|
93 | * @param null|string $shader |
||
94 | 16 | * @throws BadShaderCallException |
|
95 | 16 | * @return object|null |
|
|
|||
96 | */ |
||
97 | public function shader(string $shader = null) |
||
112 | |||
113 | /** |
||
114 | * opacity |
||
115 | * |
||
116 | * {@inheritdoc} |
||
117 | * |
||
118 | * @param float $opacity |
||
119 | * @return MaterialCMPTIF |
||
120 | 1 | */ |
|
121 | public function opacity(float $opacity = 1.0): MaterialCMPTIF |
||
126 | |||
127 | /** |
||
128 | * transparent |
||
129 | * |
||
130 | * {@inheritdoc} |
||
131 | * |
||
132 | * @param bool $transparent |
||
133 | * @return MaterialCMPTIF |
||
134 | 12 | */ |
|
135 | public function transparent(bool $transparent = false): MaterialCMPTIF |
||
140 | |||
141 | /** |
||
142 | * depthTest |
||
143 | * |
||
144 | * {@inheritdoc} |
||
145 | * |
||
146 | 1 | * @param bool $depth_test |
|
147 | * @return MaterialCMPTIF |
||
148 | 1 | */ |
|
149 | 1 | public function depthTest(bool $depth_test = true): MaterialCMPTIF |
|
154 | |||
155 | /** |
||
156 | * side |
||
157 | 5 | * |
|
158 | * {@inheritdoc} |
||
159 | 5 | * |
|
160 | 5 | * @param string $side |
|
161 | * @return MaterialCMPTIF |
||
162 | 5 | */ |
|
163 | 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 | public function fog(bool $fog = true): MaterialCMPTIF |
||
180 | |||
181 | /** |
||
182 | * Prepare Shader attributes |
||
183 | * |
||
184 | * @return void |
||
185 | */ |
||
186 | 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.