|
24 | 24 | * 'sites/default' will be used. |
25 | 25 | * |
26 | 26 | * For example, for a fictitious site installed at |
27 | | - * https://www.drupal.org:8080/mysite/test/, the 'settings.php' file is searched |
| 27 | + * https://www.drupal.org:8080/my-site/test/, the 'settings.php' file is searched |
28 | 28 | * for in the following directories: |
29 | 29 | * |
30 | | - * - sites/8080.www.drupal.org.mysite.test |
31 | | - * - sites/www.drupal.org.mysite.test |
32 | | - * - sites/drupal.org.mysite.test |
33 | | - * - sites/org.mysite.test |
| 30 | + * - sites/8080.www.drupal.org.my-site.test |
| 31 | + * - sites/www.drupal.org.my-site.test |
| 32 | + * - sites/drupal.org.my-site.test |
| 33 | + * - sites/org.my-site.test |
34 | 34 | * |
35 | | - * - sites/8080.www.drupal.org.mysite |
36 | | - * - sites/www.drupal.org.mysite |
37 | | - * - sites/drupal.org.mysite |
38 | | - * - sites/org.mysite |
| 35 | + * - sites/8080.www.drupal.org.my-site |
| 36 | + * - sites/www.drupal.org.my-site |
| 37 | + * - sites/drupal.org.my-site |
| 38 | + * - sites/org.my-site |
39 | 39 | * |
40 | 40 | * - sites/8080.www.drupal.org |
41 | 41 | * - sites/www.drupal.org |
|
46 | 46 | * |
47 | 47 | * Note that if you are installing on a non-standard port number, prefix the |
48 | 48 | * hostname with that number. For example, |
49 | | - * https://www.drupal.org:8080/mysite/test/ could be loaded from |
50 | | - * sites/8080.www.drupal.org.mysite.test/. |
| 49 | + * https://www.drupal.org:8080/my-site/test/ could be loaded from |
| 50 | + * sites/8080.www.drupal.org.my-site.test/. |
51 | 51 | * |
52 | 52 | * @see example.sites.php |
53 | 53 | * @see \Drupal\Core\DrupalKernel::getSitePath() |
|
77 | 77 | * |
78 | 78 | * @code |
79 | 79 | * $databases['default']['default'] = [ |
80 | | - * 'database' => 'databasename', |
81 | | - * 'username' => 'sqlusername', |
82 | | - * 'password' => 'sqlpassword', |
| 80 | + * 'database' => 'database_name', |
| 81 | + * 'username' => 'sql_username', |
| 82 | + * 'password' => 'sql_password', |
83 | 83 | * 'host' => 'localhost', |
84 | 84 | * 'port' => '3306', |
85 | 85 | * 'driver' => 'mysql', |
|
249 | 249 | * |
250 | 250 | * WARNING: The above defaults are designed for database portability. Changing |
251 | 251 | * them may cause unexpected behavior, including potential data loss. See |
252 | | - * https://www.drupal.org/developing/api/database/configuration for more |
253 | | - * information on these defaults and the potential issues. |
| 252 | + * https://www.drupal.org/docs/8/api/database-api/database-configuration for |
| 253 | + * more information on these defaults and the potential issues. |
254 | 254 | * |
255 | 255 | * More details can be found in the constructor methods for each driver: |
256 | 256 | * - \Drupal\mysql\Driver\Database\mysql\Connection::__construct() |
|
261 | 261 | * @code |
262 | 262 | * $databases['default']['default'] = [ |
263 | 263 | * 'driver' => 'pgsql', |
264 | | - * 'database' => 'databasename', |
265 | | - * 'username' => 'sqlusername', |
266 | | - * 'password' => 'sqlpassword', |
| 264 | + * 'database' => 'database_name', |
| 265 | + * 'username' => 'sql_username', |
| 266 | + * 'password' => 'sql_password', |
267 | 267 | * 'host' => 'localhost', |
268 | 268 | * 'prefix' => '', |
269 | 269 | * ]; |
|
273 | 273 | * @code |
274 | 274 | * $databases['default']['default'] = [ |
275 | 275 | * 'driver' => 'sqlite', |
276 | | - * 'database' => '/path/to/databasefilename', |
| 276 | + * 'database' => '/path/to/database_filename', |
277 | 277 | * ]; |
278 | 278 | * @endcode |
279 | 279 | * |
|
283 | 283 | * 'driver' => 'my_driver', |
284 | 284 | * 'namespace' => 'Drupal\my_module\Driver\Database\my_driver', |
285 | 285 | * 'autoload' => 'modules/my_module/src/Driver/Database/my_driver/', |
286 | | - * 'database' => 'databasename', |
287 | | - * 'username' => 'sqlusername', |
288 | | - * 'password' => 'sqlpassword', |
| 286 | + * 'database' => 'database_name', |
| 287 | + * 'username' => 'sql_username', |
| 288 | + * 'password' => 'sql_password', |
289 | 289 | * 'host' => 'localhost', |
290 | 290 | * 'prefix' => '', |
291 | 291 | * ]; |
292 | 292 | * @endcode |
| 293 | + * |
| 294 | + * Sample Database configuration format for a driver that is extending another |
| 295 | + * database driver. |
| 296 | + * @code |
| 297 | + * $databases['default']['default'] = [ |
| 298 | + * 'driver' => 'my_driver', |
| 299 | + * 'namespace' => 'Drupal\my_module\Driver\Database\my_driver', |
| 300 | + * 'autoload' => 'modules/my_module/src/Driver/Database/my_driver/', |
| 301 | + * 'database' => 'database_name', |
| 302 | + * 'username' => 'sql_username', |
| 303 | + * 'password' => 'sql_password', |
| 304 | + * 'host' => 'localhost', |
| 305 | + * 'prefix' => '', |
| 306 | + * 'dependencies' => [ |
| 307 | + * 'parent_module' => [ |
| 308 | + * 'namespace' => 'Drupal\parent_module', |
| 309 | + * 'autoload' => 'core/modules/parent_module/src/', |
| 310 | + * ], |
| 311 | + * ], |
| 312 | + * ]; |
| 313 | + * @endcode |
293 | 314 | */ |
294 | 315 |
|
295 | 316 | /** |
|
402 | 423 | * security, or encryption benefits. In an environment where Drupal |
403 | 424 | * is behind a reverse proxy, the real IP address of the client should |
404 | 425 | * be determined such that the correct client IP address is available |
405 | | - * to Drupal's logging, statistics, and access management systems. In |
406 | | - * the most simple scenario, the proxy server will add an |
407 | | - * X-Forwarded-For header to the request that contains the client IP |
408 | | - * address. However, HTTP headers are vulnerable to spoofing, where a |
409 | | - * malicious client could bypass restrictions by setting the |
410 | | - * X-Forwarded-For header directly. Therefore, Drupal's proxy |
411 | | - * configuration requires the IP addresses of all remote proxies to be |
412 | | - * specified in $settings['reverse_proxy_addresses'] to work correctly. |
| 426 | + * to Drupal's logging and access management systems. In the most simple |
| 427 | + * scenario, the proxy server will add an X-Forwarded-For header to the request |
| 428 | + * that contains the client IP address. However, HTTP headers are vulnerable to |
| 429 | + * spoofing, where a malicious client could bypass restrictions by setting the |
| 430 | + * X-Forwarded-For header directly. Therefore, Drupal's proxy configuration |
| 431 | + * requires the IP addresses of all remote proxies to be specified in |
| 432 | + * $settings['reverse_proxy_addresses'] to work correctly. |
413 | 433 | * |
414 | 434 | * Enable this setting to get Drupal to determine the client IP from the |
415 | 435 | * X-Forwarded-For header. If you are unsure about this setting, do not have a |
|
635 | 655 | * the output of phpinfo(). The full output can contain sensitive information |
636 | 656 | * so by default Drupal removes some sections. |
637 | 657 | * |
638 | | - * This behaviour can be configured by setting this variable to a different |
| 658 | + * This behavior can be configured by setting this variable to a different |
639 | 659 | * value corresponding to the flags parameter of phpinfo(). |
640 | 660 | * |
641 | 661 | * If you need to expose more information in the report - for example to debug a |
|
855 | 875 | */ |
856 | 876 | $settings['entity_update_backup'] = TRUE; |
857 | 877 |
|
| 878 | +/** |
| 879 | + * State caching. |
| 880 | + * |
| 881 | + * State caching uses the cache collector pattern to cache all requested keys |
| 882 | + * from the state API in a single cache entry, which can greatly reduce the |
| 883 | + * amount of database queries. However, some sites may use state with a |
| 884 | + * lot of dynamic keys which could result in a very large cache. |
| 885 | + */ |
| 886 | +$settings['state_cache'] = TRUE; |
| 887 | + |
858 | 888 | /** |
859 | 889 | * Node migration type. |
860 | 890 | * |
|
0 commit comments