[ Index ]

PHP Cross Reference of phpBB-3.2.11-deutsch

title

Body

[close]

/phpbb/install/ -> installer_configuration.php (source)

   1  <?php
   2  /**
   3  *
   4  * This file is part of the phpBB Forum Software package.
   5  *
   6  * @copyright (c) phpBB Limited <https://www.phpbb.com>
   7  * @license GNU General Public License, version 2 (GPL-2.0)
   8  *
   9  * For full copyright and license information, please see
  10  * the docs/CREDITS.txt file.
  11  *
  12  */
  13  
  14  namespace phpbb\install;
  15  
  16  use Symfony\Component\Config\Definition\Builder\TreeBuilder;
  17  use Symfony\Component\Config\Definition\ConfigurationInterface;
  18  
  19  class installer_configuration implements ConfigurationInterface
  20  {
  21  
  22      /**
  23       * Generates the configuration tree builder.
  24       *
  25       * @return \Symfony\Component\Config\Definition\Builder\TreeBuilder The tree builder
  26       */
  27  	public function getConfigTreeBuilder()
  28      {
  29          $treeBuilder = new TreeBuilder();
  30          $rootNode = $treeBuilder->root('installer');
  31          $rootNode
  32              ->children()
  33                  ->arrayNode('admin')
  34                      ->children()
  35                          ->scalarNode('name')->defaultValue('admin')->cannotBeEmpty()->end()
  36                          ->scalarNode('password')->defaultValue('adminadmin')->cannotBeEmpty()->end()
  37                          ->scalarNode('email')->defaultValue('admin@example.org')->cannotBeEmpty()->end()
  38                      ->end()
  39                  ->end()
  40                  ->arrayNode('board')
  41                      ->children()
  42                          ->scalarNode('lang')
  43                              ->defaultValue('en')
  44                              ->cannotBeEmpty()
  45                              ->end()
  46                          ->scalarNode('name')
  47                              ->defaultValue('My Board')
  48                              ->cannotBeEmpty()
  49                              ->end()
  50                          ->scalarNode('description')
  51                          ->defaultValue('My amazing new phpBB board')
  52                          ->cannotBeEmpty()
  53                          ->end()
  54                      ->end()
  55                  ->end()
  56                  ->arrayNode('database')
  57                      ->children()
  58                          ->scalarNode('dbms')
  59                              ->defaultValue('sqlite3')
  60                              ->cannotBeEmpty()
  61                              ->isRequired()
  62                              ->end()
  63                          ->scalarNode('dbhost')
  64                              ->defaultValue(null)
  65                              ->end()
  66                          ->scalarNode('dbport')
  67                              ->defaultValue(null)
  68                              ->end()
  69                          ->scalarNode('dbuser')
  70                              ->defaultValue(null)
  71                              ->end()
  72                          ->scalarNode('dbpasswd')
  73                              ->defaultValue(null)
  74                              ->end()
  75                          ->scalarNode('dbname')
  76                              ->defaultValue(null)
  77                              ->end()
  78                          ->scalarNode('table_prefix')
  79                              ->defaultValue('phpbb_')
  80                              ->cannotBeEmpty()
  81                              ->isRequired()
  82                              ->end()
  83                      ->end()
  84                  ->end()
  85                  ->arrayNode('email')
  86                      ->canBeEnabled()
  87                      ->addDefaultsIfNotSet()
  88                      ->children()
  89                          ->booleanNode('smtp_delivery')
  90                              ->defaultValue(false)
  91                              ->treatNullLike(false)
  92                              ->end()
  93                          ->scalarNode('smtp_host')
  94                              ->defaultValue(null)
  95                              ->end()
  96                          ->scalarNode('smtp_port')
  97                              ->defaultValue(null)
  98                              ->end()
  99                          ->scalarNode('smtp_auth')
 100                              ->defaultValue(null)
 101                              ->end()
 102                          ->scalarNode('smtp_user')
 103                              ->defaultValue(null)
 104                              ->end()
 105                          ->scalarNode('smtp_pass')
 106                              ->defaultValue(null)
 107                              ->end()
 108                      ->end()
 109                  ->end()
 110                  ->arrayNode('server')
 111                      ->children()
 112                          ->booleanNode('cookie_secure')
 113                              ->defaultValue(false)
 114                              ->treatNullLike(false)
 115                              ->end()
 116                          ->scalarNode('server_protocol')
 117                              ->defaultValue('http://')
 118                              ->cannotBeEmpty()
 119                              ->end()
 120                          ->booleanNode('force_server_vars')
 121                              ->defaultValue(false)
 122                              ->treatNullLike(false)
 123                              ->end()
 124                          ->scalarNode('server_name')
 125                              ->defaultValue('localhost')
 126                              ->cannotBeEmpty()
 127                              ->end()
 128                          ->integerNode('server_port')
 129                              ->defaultValue(80)
 130                              ->min(1)
 131                              ->cannotBeEmpty()
 132                              ->end()
 133                          ->scalarNode('script_path')
 134                              ->defaultValue('/')
 135                              ->cannotBeEmpty()
 136                               ->end()
 137                      ->end()
 138                  ->end()
 139                  ->arrayNode('extensions')
 140                      ->prototype('scalar')->end()
 141                      ->defaultValue([])
 142                  ->end()
 143              ->end()
 144          ;
 145          return $treeBuilder;
 146      }
 147  }


Generated: Wed Nov 11 20:33:01 2020 Cross-referenced by PHPXref 0.7.1