vendor/erichard/glide-bundle/DependencyInjection/Configuration.php line 21

Open in your IDE?
  1. <?php
  2. namespace Erichard\GlideBundle\DependencyInjection;
  3. use Symfony\Component\Config\Definition\Builder\TreeBuilder;
  4. use Symfony\Component\Config\Definition\ConfigurationInterface;
  5. /**
  6.  * This is the class that validates and merges configuration from your app/config files.
  7.  *
  8.  * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/configuration.html}
  9.  */
  10. class Configuration implements ConfigurationInterface
  11. {
  12.     /**
  13.      * {@inheritdoc}
  14.      */
  15.     public function getConfigTreeBuilder()
  16.     {
  17.         $treeBuilder = new TreeBuilder();
  18.         $rootNode $treeBuilder->root('erichard_glide');
  19.         $rootNode
  20.             ->children()
  21.                 ->scalarNode('sign_key')->defaultValue(null)->end()
  22.                 ->arrayNode('presets')
  23.                     ->useAttributeAsKey('name')
  24.                     ->prototype('array')
  25.                         ->children()
  26.                             ->scalarNode('or')->defaultNull()->end()
  27.                             ->scalarNode('crop')->defaultNull()->end()
  28.                             ->integerNode('w')->defaultNull()->end()
  29.                             ->integerNode('h')->defaultNull()->end()
  30.                             ->scalarNode('fit')->defaultNull()->end()
  31.                             ->integerNode('dpr')->defaultNull()->end()
  32.                             ->integerNode('bri')->defaultNull()->end()
  33.                             ->integerNode('con')->defaultNull()->end()
  34.                             ->floatNode('gam')->defaultNull()->end()
  35.                             ->integerNode('sharp')->defaultNull()->end()
  36.                             ->integerNode('blur')->defaultNull()->end()
  37.                             ->integerNode('pixel')->defaultNull()->end()
  38.                             ->scalarNode('filt')->defaultNull()->end()
  39.                             ->scalarNode('mark')->defaultNull()->end()
  40.                             ->scalarNode('markw')->defaultNull()->end()
  41.                             ->scalarNode('markh')->defaultNull()->end()
  42.                             ->scalarNode('markx')->defaultNull()->end()
  43.                             ->scalarNode('marky')->defaultNull()->end()
  44.                             ->scalarNode('markpad')->defaultNull()->end()
  45.                             ->scalarNode('markpos')->defaultNull()->end()
  46.                             ->scalarNode('markalpha')->defaultNull()->end()
  47.                             ->scalarNode('bg')->defaultNull()->end()
  48.                             ->scalarNode('border')->defaultNull()->end()
  49.                             ->integerNode('q')->defaultNull()->end()
  50.                             ->scalarNode('fm')->defaultNull()->end()
  51.                         ->end()
  52.                     ->end()
  53.                 ->end()
  54.                 ->arrayNode('servers')
  55.                     ->useAttributeAsKey('name')
  56.                     ->requiresAtLeastOneElement()
  57.                     ->prototype('array')
  58.                         ->children()
  59.                             ->scalarNode('source')->isRequired()->end()
  60.                             ->scalarNode('cache')->isRequired()->end()
  61.                             ->integerNode('max_image_size')->defaultNull()->end()
  62.                             ->variableNode('defaults')->defaultValue([])->end()
  63.                         ->end()
  64.                     ->end()
  65.                 ->end()
  66.             ->end()
  67.         ;
  68.         return $treeBuilder;
  69.     }
  70. }