Инструменты пользователя

Инструменты сайта


php:symfony:1x:yml:config_handlers.yml

Symfony YAML Configuration Reference

The config_handlers.yml configuration file

In this article we assume that you are familiar with The YAML Format and Configuration File Principles.

The config_handlers.yml configuration file describes the configuration handler classes used to parse and interpret all other YAML configuration files. The config_handlers.yml file links the handlers to the configuration files according to a file path.

path_to_yml_file:
  class:             class_name
  file:              path/to/class
  param:
    prefix:          prefix_name
    module:          <true | false>

Config handlers configuration options

path_to_yml_file

Defines the YAML file to parse. The path to the file is defines related to the %SF_APP_DIR% directory. You can also use wildcard characters (*). By default there are defined these YAML files:

  • config/autoload.yml
  • config/databases.yml
  • config/settings.yml
  • config/app.yml
  • config/factories.yml
  • config/core_compile.yml
  • config/filters.yml
  • config/routing.yml
  • modules/*/config/generator.yml
  • modules/*/config/view.yml
  • modules/*/config/security.yml
  • modules/*/config/cache.yml
  • modules/*/config/module.yml

<a href="http://www.symfonyreference.com/config-handlers-yml#path-to-yml-file-525">path_to_yml_file > class

Defines YAML file parser class. The default config_handlers.yml file defines the parser classes as follows:

  • autoload.yml - sfAutoloadConfigHandler;
  • databases.yml - sfDatabaseConfigHandler;
  • settings.yml - sfDefineEnvironmentConfigHandler;
  • app.yml - sfDefineEnvironmentConfigHandler;
  • factories.yml - sfFactoryConfigHandler;
  • core_compile.yml - sfCompileConfigHandler;
  • filters.yml - sfFilterConfigHandler;
  • routing.yml - sfRoutingConfigHandler;
  • generator.yml - sfGeneratorConfigHandler;
  • view.yml - sfViewConfigHandler;
  • security.yml - sfSecurityConfigHandler;
  • cache.yml - sfCacheConfigHandler;
  • module.yml - sfDefineEnvironmentConfigHandler.

<a href="http://www.symfonyreference.com/config-handlers-yml#path-to-yml-file-525">path_to_yml_file > file

Defines the full path to handler class. When adding your own configuration handlers, you must specify both the class name and the full path to your handler source file under the class and the file entries respectively. This is required as the configuration is initialized before the autoloading mechanism in sfApplicationConfiguration.

Parameters

<a href="http://www.symfonyreference.com/config-handlers-yml#path-to-yml-file-525">path_to_yml_file > param

Each configuration file is defined by a class and can be further customized by defining some parameters under the param section.

<a href="http://www.symfonyreference.com/config-handlers-yml#path-to-yml-file-525">path_to_yml_file > <a href="http://www.symfonyreference.com/config-handlers-yml#param-527">param > prefix

The settings of configuration files handled by sfDefineEnvironmentConfigHandler can be made available directly in the code via the sfConfig class. This handler adds the prefix to each of the setting names. Be careful not to choose a prefix already used by another handler. Existing prefixes are sf_, app_, and mod_.

<a href="http://www.symfonyreference.com/config-handlers-yml#path-to-yml-file-525">path_to_yml_file > <a href="http://www.symfonyreference.com/config-handlers-yml#param-527">param > module

Defines whether to add module name to the prefix. This option is available only for sfDefineEnvironmentConfigHandler class. Possible values: <true | false> Default: false

/var/www/source/data/pages/php/symfony/1x/yml/config_handlers.yml.txt · Последнее изменение: 2024/02/05 12:40 (внешнее изменение)