@@ 250-263 (lines=14) @@ | ||
247 | * example: |
|
248 | * array( 'ClassInterface' => 'Fully\Qualified\ClassName' ) |
|
249 | */ |
|
250 | public function setIngredients(array $ingredients) |
|
251 | { |
|
252 | if (empty($ingredients)) { |
|
253 | return; |
|
254 | } |
|
255 | if ( ! is_array($ingredients)) { |
|
256 | throw new InvalidDataTypeException( |
|
257 | '$ingredients', |
|
258 | is_object($ingredients) ? get_class($ingredients) : gettype($ingredients), |
|
259 | __('array of class dependencies', 'event_espresso') |
|
260 | ); |
|
261 | } |
|
262 | $this->ingredients = array_merge($this->ingredients, $ingredients); |
|
263 | } |
|
264 | ||
265 | ||
266 | /** |
|
@@ 281-294 (lines=14) @@ | ||
278 | * example: |
|
279 | * array( 'ClassInterface' => 'Fully\Qualified\ClassName' ) |
|
280 | */ |
|
281 | public function setFilters(array $filters) |
|
282 | { |
|
283 | if (empty($filters)) { |
|
284 | return; |
|
285 | } |
|
286 | if ( ! is_array($filters)) { |
|
287 | throw new InvalidDataTypeException( |
|
288 | '$filters', |
|
289 | is_object($filters) ? get_class($filters) : gettype($filters), |
|
290 | __('array of class aliases', 'event_espresso') |
|
291 | ); |
|
292 | } |
|
293 | $this->filters = array_merge($this->filters, $filters); |
|
294 | } |
|
295 | ||
296 | ||
297 |