Completed
Push — foshttpcache_remove ( 87a308...ca7e4e )
by André
43:38
created

EzPublishCoreExtension::handleRouting()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 15
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 9
nc 2
nop 3
dl 0
loc 15
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * File containing the EzPublishCoreExtension class.
5
 *
6
 * @copyright Copyright (C) eZ Systems AS. All rights reserved.
7
 * @license For full copyright and license information view LICENSE file distributed with this source code.
8
 */
9
namespace eZ\Bundle\EzPublishCoreBundle\DependencyInjection;
10
11
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\ConfigParser;
12
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\ConfigurationProcessor;
13
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\Suggestion\Collector\SuggestionCollector;
14
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\Suggestion\Collector\SuggestionCollectorAwareInterface;
15
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\Suggestion\Formatter\YamlSuggestionFormatter;
16
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Security\PolicyProvider\PoliciesConfigBuilder;
17
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Security\PolicyProvider\PolicyProviderInterface;
18
use eZ\Bundle\EzPublishCoreBundle\SiteAccess\SiteAccessConfigurationFilter;
19
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
20
use Symfony\Component\DependencyInjection\ContainerBuilder;
21
use Symfony\Component\DependencyInjection\Loader;
22
use Symfony\Component\DependencyInjection\Loader\FileLoader;
23
use Symfony\Component\Config\FileLocator;
24
use InvalidArgumentException;
25
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\ParserInterface;
26
27
class EzPublishCoreExtension extends Extension
28
{
29
    const RICHTEXT_CUSTOM_TAGS_PARAMETER = 'ezplatform.ezrichtext.custom_tags';
30
31
    /**
32
     * @var \eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\Suggestion\Collector\SuggestionCollector
33
     */
34
    private $suggestionCollector;
35
36
    /**
37
     * @var \eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\ParserInterface
38
     */
39
    private $mainConfigParser;
40
41
    /**
42
     * @var \eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\ParserInterface[]
43
     */
44
    private $configParsers;
45
46
    /**
47
     * @var PolicyProviderInterface[]
48
     */
49
    private $policyProviders = [];
50
51
    /**
52
     * Holds a collection of YAML files, as an array with directory path as a
53
     * key to the array of contained file names.
54
     *
55
     * @var array
56
     */
57
    private $defaultSettingsCollection = [];
58
59
    /**
60
     * @var \eZ\Bundle\EzPublishCoreBundle\SiteAccess\SiteAccessConfigurationFilter[]
61
     */
62
    private $siteaccessConfigurationFilters = [];
63
64
    public function __construct(array $configParsers = array())
65
    {
66
        $this->configParsers = $configParsers;
67
        $this->suggestionCollector = new SuggestionCollector();
68
    }
69
70
    public function getAlias()
71
    {
72
        return 'ezpublish';
73
    }
74
75
    /**
76
     * Loads a specific configuration.
77
     *
78
     * @param mixed[] $configs An array of configuration values
79
     * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container A ContainerBuilder instance
80
     *
81
     * @throws \InvalidArgumentException When provided tag is not defined in this extension
82
     *
83
     * @api
84
     */
85
    public function load(array $configs, ContainerBuilder $container)
86
    {
87
        $loader = new Loader\YamlFileLoader(
88
            $container,
89
            new FileLocator(__DIR__ . '/../Resources/config')
90
        );
91
92
        $configuration = $this->getConfiguration($configs, $container);
93
94
        // Note: this is where the transformation occurs
95
        $config = $this->processConfiguration($configuration, $configs);
96
97
        // Base services and services overrides
98
        $loader->load('services.yml');
99
        // Security services
100
        $loader->load('security.yml');
101
102
        if (interface_exists('FOS\JsRoutingBundle\Extractor\ExposedRoutesExtractorInterface')) {
103
            $loader->load('routing/js_routing.yml');
104
        }
105
106
        // Default settings
107
        $this->handleDefaultSettingsLoading($container, $loader);
108
109
        $this->registerRepositoriesConfiguration($config, $container);
110
        $this->registerSiteAccessConfiguration($config, $container);
111
        $this->registerImageMagickConfiguration($config, $container);
112
        $this->registerPageConfiguration($config, $container);
113
        $this->registerRichTextConfiguration($config, $container);
114
115
        // Routing
116
        $this->handleRouting($config, $container, $loader);
117
        // Public API loading
118
        $this->handleApiLoading($container, $loader);
119
        $this->handleTemplating($container, $loader);
120
        $this->handleSessionLoading($container, $loader);
121
        $this->handleCache($config, $container, $loader);
122
        $this->handleLocale($config, $container, $loader);
123
        $this->handleHelpers($config, $container, $loader);
124
        $this->handleImage($config, $container, $loader);
125
        $this->handleUrlChecker($config, $container, $loader);
126
127
        // Map settings
128
        $processor = new ConfigurationProcessor($container, 'ezsettings');
129
        $processor->mapConfig($config, $this->getMainConfigParser());
130
131
        if ($this->suggestionCollector->hasSuggestions()) {
132
            $message = '';
133
            $suggestionFormatter = new YamlSuggestionFormatter();
134
            foreach ($this->suggestionCollector->getSuggestions() as $suggestion) {
135
                $message .= $suggestionFormatter->format($suggestion) . "\n\n";
136
            }
137
138
            throw new InvalidArgumentException($message);
139
        }
140
141
        $this->handleSiteAccessesRelation($container);
142
        $this->buildPolicyMap($container);
143
    }
144
145
    /**
146
     * @param array $config
147
     * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
148
     *
149
     * @return \eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration
150
     */
151
    public function getConfiguration(array $config, ContainerBuilder $container)
152
    {
153
        $configuration = new Configuration($this->getMainConfigParser(), $this->suggestionCollector);
154
        $configuration->setSiteAccessConfigurationFilters($this->siteaccessConfigurationFilters);
155
156
        return $configuration;
157
    }
158
159
    /**
160
     * @return \eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\ParserInterface
161
     */
162
    private function getMainConfigParser()
163
    {
164
        if ($this->mainConfigParser === null) {
165
            foreach ($this->configParsers as $parser) {
166
                if ($parser instanceof SuggestionCollectorAwareInterface) {
167
                    $parser->setSuggestionCollector($this->suggestionCollector);
168
                }
169
            }
170
171
            $this->mainConfigParser = new ConfigParser($this->configParsers);
172
        }
173
174
        return $this->mainConfigParser;
175
    }
176
177
    /**
178
     * Handle default settings.
179
     *
180
     * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
181
     * @param \Symfony\Component\DependencyInjection\Loader\FileLoader $loader
182
     */
183
    private function handleDefaultSettingsLoading(ContainerBuilder $container, FileLoader $loader)
184
    {
185
        $loader->load('default_settings.yml');
186
187
        foreach ($this->defaultSettingsCollection as $fileLocation => $files) {
188
            $externalLoader = new Loader\YamlFileLoader($container, new FileLocator($fileLocation));
189
            foreach ($files as $file) {
190
                $externalLoader->load($file);
191
            }
192
        }
193
    }
194
195
    private function registerRepositoriesConfiguration(array $config, ContainerBuilder $container)
196
    {
197
        if (!isset($config['repositories'])) {
198
            $config['repositories'] = array();
199
        }
200
201
        foreach ($config['repositories'] as $name => &$repository) {
202
            if (empty($repository['fields_groups']['list'])) {
203
                $repository['fields_groups']['list'] = $container->getParameter('ezsettings.default.content.field_groups.list');
204
            }
205
        }
206
207
        $container->setParameter('ezpublish.repositories', $config['repositories']);
208
    }
209
210
    private function registerSiteAccessConfiguration(array $config, ContainerBuilder $container)
211
    {
212
        if (!isset($config['siteaccess'])) {
213
            $config['siteaccess'] = array();
214
            $config['siteaccess']['list'] = array('setup');
215
            $config['siteaccess']['default_siteaccess'] = 'setup';
216
            $config['siteaccess']['groups'] = array();
217
            $config['siteaccess']['match'] = null;
218
        }
219
220
        $container->setParameter('ezpublish.siteaccess.list', $config['siteaccess']['list']);
221
        ConfigurationProcessor::setAvailableSiteAccesses($config['siteaccess']['list']);
222
        $container->setParameter('ezpublish.siteaccess.default', $config['siteaccess']['default_siteaccess']);
223
        $container->setParameter('ezpublish.siteaccess.match_config', $config['siteaccess']['match']);
224
225
        // Register siteaccess groups + reverse
226
        $container->setParameter('ezpublish.siteaccess.groups', $config['siteaccess']['groups']);
227
        $groupsBySiteaccess = array();
228 View Code Duplication
        foreach ($config['siteaccess']['groups'] as $groupName => $groupMembers) {
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
229
            foreach ($groupMembers as $member) {
230
                if (!isset($groupsBySiteaccess[$member])) {
231
                    $groupsBySiteaccess[$member] = array();
232
                }
233
234
                $groupsBySiteaccess[$member][] = $groupName;
235
            }
236
        }
237
        $container->setParameter('ezpublish.siteaccess.groups_by_siteaccess', $groupsBySiteaccess);
238
        ConfigurationProcessor::setGroupsBySiteAccess($groupsBySiteaccess);
239
    }
240
241
    private function registerImageMagickConfiguration(array $config, ContainerBuilder $container)
242
    {
243
        if (isset($config['imagemagick'])) {
244
            $container->setParameter('ezpublish.image.imagemagick.enabled', $config['imagemagick']['enabled']);
245
            if ($config['imagemagick']['enabled']) {
246
                $container->setParameter('ezpublish.image.imagemagick.executable_path', dirname($config['imagemagick']['path']));
247
                $container->setParameter('ezpublish.image.imagemagick.executable', basename($config['imagemagick']['path']));
248
            }
249
        }
250
251
        $filters = isset($config['imagemagick']['filters']) ? $config['imagemagick']['filters'] : array();
252
        $filters = $filters + $container->getParameter('ezpublish.image.imagemagick.filters');
253
        $container->setParameter('ezpublish.image.imagemagick.filters', $filters);
254
    }
255
256
    private function registerPageConfiguration(array $config, ContainerBuilder $container)
257
    {
258
        if (isset($config['ezpage']['layouts'])) {
259
            $container->setParameter(
260
                'ezpublish.ezpage.layouts',
261
                $config['ezpage']['layouts'] + $container->getParameter('ezpublish.ezpage.layouts')
262
            );
263
        }
264
        if (isset($config['ezpage']['blocks'])) {
265
            $container->setParameter(
266
                'ezpublish.ezpage.blocks',
267
                $config['ezpage']['blocks'] + $container->getParameter('ezpublish.ezpage.blocks')
268
            );
269
        }
270
        if (isset($config['ezpage']['enabledLayouts'])) {
271
            $container->setParameter(
272
                'ezpublish.ezpage.enabledLayouts',
273
                $config['ezpage']['enabledLayouts'] + $container->getParameter('ezpublish.ezpage.enabledLayouts')
274
            );
275
        }
276
        if (isset($config['ezpage']['enabledBlocks'])) {
277
            $container->setParameter(
278
                'ezpublish.ezpage.enabledBlocks',
279
                $config['ezpage']['enabledBlocks'] + $container->getParameter('ezpublish.ezpage.enabledBlocks')
280
            );
281
        }
282
    }
283
284
    /**
285
     * Register parameters of global RichText configuration.
286
     *
287
     * @param array $config
288
     * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
289
     */
290
    private function registerRichTextConfiguration(array $config, ContainerBuilder $container)
291
    {
292
        if (isset($config['ezrichtext']['custom_tags'])) {
293
            $container->setParameter(
294
                static::RICHTEXT_CUSTOM_TAGS_PARAMETER,
295
                $config['ezrichtext']['custom_tags']
296
            );
297
        }
298
    }
299
300
    /**
301
     * Handle routing parameters.
302
     *
303
     * @param array $config
304
     * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
305
     * @param \Symfony\Component\DependencyInjection\Loader\FileLoader $loader
306
     */
307
    private function handleRouting(array $config, ContainerBuilder $container, FileLoader $loader)
308
    {
309
        $loader->load('routing.yml');
310
        $container->setAlias('router', 'ezpublish.chain_router');
311
312
        if (isset($config['router']['default_router']['non_siteaccess_aware_routes'])) {
313
            $container->setParameter(
314
                'ezpublish.default_router.non_siteaccess_aware_routes',
315
                array_merge(
316
                    $container->getParameter('ezpublish.default_router.non_siteaccess_aware_routes'),
317
                    $config['router']['default_router']['non_siteaccess_aware_routes']
318
                )
319
            );
320
        }
321
    }
322
323
    /**
324
     * Handle public API loading.
325
     *
326
     * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
327
     * @param \Symfony\Component\DependencyInjection\Loader\FileLoader $loader
328
     */
329
    private function handleApiLoading(ContainerBuilder $container, FileLoader $loader)
330
    {
331
        // Loading configuration from Core/settings
332
        $coreLoader = new Loader\YamlFileLoader(
333
            $container,
334
            new FileLocator(__DIR__ . '/../../../Publish/Core/settings')
335
        );
336
        $coreLoader->load('repository.yml');
337
        $coreLoader->load('repository/inner.yml');
338
        $coreLoader->load('repository/signalslot.yml');
339
        $coreLoader->load('fieldtype_external_storages.yml');
340
        $coreLoader->load('fieldtypes.yml');
341
        $coreLoader->load('indexable_fieldtypes.yml');
342
        $coreLoader->load('roles.yml');
343
        $coreLoader->load('storage_engines/common.yml');
344
        $coreLoader->load('storage_engines/cache.yml');
345
        $coreLoader->load('storage_engines/legacy.yml');
346
        $coreLoader->load('storage_engines/shortcuts.yml');
347
        $coreLoader->load('search_engines/common.yml');
348
        $coreLoader->load('utils.yml');
349
        $coreLoader->load('io.yml');
350
351
        // Public API services
352
        $loader->load('papi.yml');
353
354
        // Built-in field types
355
        $loader->load('fieldtype_services.yml');
356
357
        // Storage engine
358
        $loader->load('storage_engines.yml');
359
    }
360
361
    /**
362
     * Handle templating parameters.
363
     *
364
     * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
365
     * @param \Symfony\Component\DependencyInjection\Loader\FileLoader $loader
366
     */
367
    private function handleTemplating(ContainerBuilder $container, FileLoader $loader)
0 ignored issues
show
Unused Code introduced by
The parameter $container is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
368
    {
369
        $loader->load('templating.yml');
370
    }
371
372
    /**
373
     * Handle session parameters.
374
     *
375
     * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
376
     * @param \Symfony\Component\DependencyInjection\Loader\FileLoader $loader
377
     */
378
    private function handleSessionLoading(ContainerBuilder $container, FileLoader $loader)
0 ignored issues
show
Unused Code introduced by
The parameter $container is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
379
    {
380
        $loader->load('session.yml');
381
    }
382
383
    /**
384
     * Handle cache parameters.
385
     *
386
     * @param array $config
387
     * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
388
     * @param \Symfony\Component\DependencyInjection\Loader\FileLoader $loader
389
     *
390
     * @throws \InvalidArgumentException
391
     */
392
    private function handleCache(array $config, ContainerBuilder $container, FileLoader $loader)
393
    {
394
        $loader->load('cache.yml');
395
396
        $purgeService = null;
0 ignored issues
show
Unused Code introduced by
$purgeService is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
397
        if (isset($config['http_cache']['purge_type'])) {
398
            $container->setParameter('ezpublish.http_cache.purge_type', $config['http_cache']['purge_type']);
399
        }
400
    }
401
402
    /**
403
     * Handle locale parameters.
404
     *
405
     * @param array $config
406
     * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
407
     * @param \Symfony\Component\DependencyInjection\Loader\FileLoader $loader
408
     */
409
    private function handleLocale(array $config, ContainerBuilder $container, FileLoader $loader)
410
    {
411
        $loader->load('locale.yml');
412
        $container->setParameter(
413
            'ezpublish.locale.conversion_map',
414
            $config['locale_conversion'] + $container->getParameter('ezpublish.locale.conversion_map')
415
        );
416
    }
417
418
    /**
419
     * Handle helpers.
420
     *
421
     * @param array $config
422
     * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
423
     * @param \Symfony\Component\DependencyInjection\Loader\FileLoader $loader
424
     */
425
    private function handleHelpers(array $config, ContainerBuilder $container, FileLoader $loader)
0 ignored issues
show
Unused Code introduced by
The parameter $config is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $container is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
426
    {
427
        $loader->load('helpers.yml');
428
    }
429
430
    /**
431
     * Handles relation between SiteAccesses.
432
     * Related SiteAccesses share the same repository and root location id.
433
     *
434
     * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
435
     */
436
    private function handleSiteAccessesRelation(ContainerBuilder $container)
437
    {
438
        $configResolver = $container->get('ezpublish.config.resolver.core');
439
        $configResolver->setContainer($container);
440
441
        $saRelationMap = array();
442
        $saList = $container->getParameter('ezpublish.siteaccess.list');
443
        // First build the SiteAccess relation map, indexed by repository and rootLocationId.
444
        foreach ($saList as $sa) {
445
            $repository = $configResolver->getParameter('repository', 'ezsettings', $sa);
446
            if (!isset($saRelationMap[$repository])) {
447
                $saRelationMap[$repository] = array();
448
            }
449
450
            $rootLocationId = $configResolver->getParameter('content.tree_root.location_id', 'ezsettings', $sa);
451
            if (!isset($saRelationMap[$repository][$rootLocationId])) {
452
                $saRelationMap[$repository][$rootLocationId] = array();
453
            }
454
            $saRelationMap[$repository][$rootLocationId][] = $sa;
455
        }
456
        $container->setParameter('ezpublish.siteaccess.relation_map', $saRelationMap);
457
458
        // Now build the related SiteAccesses list, based on the relation map.
459
        foreach ($saList as $sa) {
460
            $repository = $configResolver->getParameter('repository', 'ezsettings', $sa);
461
            $rootLocationId = $configResolver->getParameter('content.tree_root.location_id', 'ezsettings', $sa);
462
            $container->setParameter(
463
                "ezsettings.$sa.related_siteaccesses",
464
                $saRelationMap[$repository][$rootLocationId]
465
            );
466
        }
467
    }
468
469
    /**
470
     * @param array $config
471
     * @param ContainerBuilder $container
472
     * @param FileLoader $loader
473
     */
474
    private function handleImage(array $config, ContainerBuilder $container, FileLoader $loader)
0 ignored issues
show
Unused Code introduced by
The parameter $config is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $container is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
475
    {
476
        $loader->load('image.yml');
477
    }
478
479
    private function handleUrlChecker($config, ContainerBuilder $container, FileLoader $loader)
0 ignored issues
show
Unused Code introduced by
The parameter $config is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $container is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
480
    {
481
        $loader->load('url_checker.yml');
482
    }
483
484
    private function buildPolicyMap(ContainerBuilder $container)
485
    {
486
        $policiesBuilder = new PoliciesConfigBuilder($container);
487
        foreach ($this->policyProviders as $provider) {
488
            $provider->addPolicies($policiesBuilder);
489
        }
490
    }
491
492
    /**
493
     * Adds a new policy provider to the internal collection.
494
     * One can call this method from a bundle `build()` method.
495
     *
496
     * ```php
497
     * public function build(ContainerBuilder $container)
498
     * {
499
     *     $ezExtension = $container->getExtension('ezpublish');
500
     *     $ezExtension->addPolicyProvider($myPolicyProvider);
501
     * }
502
     * ```
503
     *
504
     * @since 6.0
505
     *
506
     * @param PolicyProviderInterface $policyProvider
507
     */
508
    public function addPolicyProvider(PolicyProviderInterface $policyProvider)
509
    {
510
        $this->policyProviders[] = $policyProvider;
511
    }
512
513
    /**
514
     * Adds a new config parser to the internal collection.
515
     * One can call this method from a bundle `build()` method.
516
     *
517
     * ```php
518
     * public function build(ContainerBuilder $container)
519
     * {
520
     *     $ezExtension = $container->getExtension('ezpublish');
521
     *     $ezExtension->addConfigParser($myConfigParser);
522
     * }
523
     * ```
524
     *
525
     * @since 6.0
526
     *
527
     * @param \eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\ParserInterface $configParser
528
     */
529
    public function addConfigParser(ParserInterface $configParser)
530
    {
531
        $this->configParsers[] = $configParser;
532
    }
533
534
    /**
535
     * Adds new default settings to the internal collection.
536
     * One can call this method from a bundle `build()` method.
537
     *
538
     * ```php
539
     * public function build(ContainerBuilder $container)
540
     * {
541
     *     $ezExtension = $container->getExtension('ezpublish');
542
     *     $ezExtension->addDefaultSettings(
543
     *         __DIR__ . '/Resources/config',
544
     *         ['default_settings.yml']
545
     *     );
546
     * }
547
     * ```
548
     *
549
     * @since 6.0
550
     *
551
     * @param string $fileLocation
552
     * @param array $files
553
     */
554
    public function addDefaultSettings($fileLocation, array $files)
555
    {
556
        $this->defaultSettingsCollection[$fileLocation] = $files;
557
    }
558
559
    public function addSiteAccessConfigurationFilter(SiteAccessConfigurationFilter $filter)
560
    {
561
        $this->siteaccessConfigurationFilters[] = $filter;
562
    }
563
}
564