protected function initializeCollections()
    {
        foreach ($this->settings['collections'] as $collectionName => $collectionDefinition) {
            if (!isset($collectionDefinition['storage'])) {
                throw new Exception(sprintf('The configuration for the resource collection "%s" defined in your settings has no valid "storage" option. Please check the configuration syntax.', $collectionName), 1361468805);
            }
            if (!isset($this->storages[$collectionDefinition['storage']])) {
                throw new Exception(sprintf('The configuration for the resource collection "%s" defined in your settings referred to a non-existing storage "%s". Please check the configuration syntax and make sure to specify a valid storage class name.', $collectionName, $collectionDefinition['storage']), 1361481031);
            }
            if (!isset($collectionDefinition['target'])) {
                throw new Exception(sprintf('The configuration for the resource collection "%s" defined in your settings has no valid "target" option. Please check the configuration syntax and make sure to specify a valid target class name.', $collectionName), 1361468923);
            }
            if (!isset($this->targets[$collectionDefinition['target']])) {
                throw new Exception(sprintf('The configuration for the resource collection "%s" defined in your settings has not defined a valid "target" option. Please check the configuration syntax and make sure that the specified class "%s" really exists.', $collectionName, $collectionDefinition['target']), 1361468924);
            }

            $pathPatterns = (isset($collectionDefinition['pathPatterns'])) ? $collectionDefinition['pathPatterns'] : [];
            $filenames = (isset($collectionDefinition['filenames'])) ? $collectionDefinition['filenames'] : [];

            $this->collections[$collectionName] = new Collection($collectionName, $this->storages[$collectionDefinition['storage']], $this->targets[$collectionDefinition['target']], $pathPatterns, $filenames);
        }
    }
protected function initializeCollections()
    {
        foreach ($this->settings['collections'] as $collectionName => $collectionDefinition) {
            if (!isset($collectionDefinition['storage'])) {
                throw new Exception(sprintf('The configuration for the resource collection "%s" defined in your settings has no valid "storage" option. Please check the configuration syntax.', $collectionName), 1361468805);
            }
            if (!isset($this->storages[$collectionDefinition['storage']])) {
                throw new Exception(sprintf('The configuration for the resource collection "%s" defined in your settings referred to a non-existing storage "%s". Please check the configuration syntax and make sure to specify a valid storage class name.', $collectionName, $collectionDefinition['storage']), 1361481031);
            }
            if (!isset($collectionDefinition['target'])) {
                throw new Exception(sprintf('The configuration for the resource collection "%s" defined in your settings has no valid "target" option. Please check the configuration syntax and make sure to specify a valid target class name.', $collectionName), 1361468923);
            }
            if (!isset($this->targets[$collectionDefinition['target']])) {
                throw new Exception(sprintf('The configuration for the resource collection "%s" defined in your settings has not defined a valid "target" option. Please check the configuration syntax and make sure that the specified class "%s" really exists.', $collectionName, $collectionDefinition['target']), 1361468924);
            }

            $pathPatterns = (isset($collectionDefinition['pathPatterns'])) ? $collectionDefinition['pathPatterns'] : [];
            $filenames = (isset($collectionDefinition['filenames'])) ? $collectionDefinition['filenames'] : [];

            $this->collections[$collectionName] = new Collection($collectionName, $this->storages[$collectionDefinition['storage']], $this->targets[$collectionDefinition['target']], $pathPatterns, $filenames);
        }
    }
protected function initializeCollections ( ) { foreach ( $ this -> settings [ 'collections' ] as $ collectionName => $ collectionDefinition ) { if ( ! isset ( $ collectionDefinition [ 'storage' ] ) ) { throw new Exception ( sprintf ( 'The configuration for the resource collection "%s" defined in your settings has no valid "storage" option. Please check the configuration syntax.' , $ collectionName ) , 1361468805 ) ; } if ( ! isset ( $ this -> storages [ $ collectionDefinition [ 'storage' ] ] ) ) { throw new Exception ( sprintf ( 'The configuration for the resource collection "%s" defined in your settings referred to a non-existing storage "%s". Please check the configuration syntax and make sure to specify a valid storage class name.' , $ collectionName , $ collectionDefinition [ 'storage' ] ) , 1361481031 ) ; } if ( ! isset ( $ collectionDefinition [ 'target' ] ) ) { throw new Exception ( sprintf ( 'The configuration for the resource collection "%s" defined in your settings has no valid "target" option. Please check the configuration syntax and make sure to specify a valid target class name.' , $ collectionName ) , 1361468923 ) ; } if ( ! isset ( $ this -> targets [ $ collectionDefinition [ 'target' ] ] ) ) { throw new Exception ( sprintf ( 'The configuration for the resource collection "%s" defined in your settings has not defined a valid "target" option. Please check the configuration syntax and make sure that the specified class "%s" really exists.' , $ collectionName , $ collectionDefinition [ 'target' ] ) , 1361468924 ) ; } $ pathPatterns = ( isset ( $ collectionDefinition [ 'pathPatterns' ] ) ) ? $ collectionDefinition [ 'pathPatterns' ] : [ ] ; $ filenames = ( isset ( $ collectionDefinition [ 'filenames' ] ) ) ? $ collectionDefinition [ 'filenames' ] : [ ] ; $ this -> collections [ $ collectionName ] = new Collection ( $ collectionName , $ this -> storages [ $ collectionDefinition [ 'storage' ] ] , $ this -> targets [ $ collectionDefinition [ 'target' ] ] , $ pathPatterns , $ filenames ) ; } }
Initializes the Collection objects according to the current settings

@return void
@throws Exception if the collection configuration is invalid
Initializes the Collection objects according to the current settings