api/symfony/Bundle/FrameworkBundle/Translation/Translator.yaml
2024-09-26 02:03:21 -07:00

101 lines
3.4 KiB
YAML

name: Translator
class_comment: '# * @author Fabien Potencier <fabien@symfony.com>
# *
# * @final since Symfony 7.1'
dependencies:
- name: ContainerInterface
type: class
source: Psr\Container\ContainerInterface
- name: DirectoryResource
type: class
source: Symfony\Component\Config\Resource\DirectoryResource
- name: FileExistenceResource
type: class
source: Symfony\Component\Config\Resource\FileExistenceResource
- name: WarmableInterface
type: class
source: Symfony\Component\HttpKernel\CacheWarmer\WarmableInterface
- name: InvalidArgumentException
type: class
source: Symfony\Component\Translation\Exception\InvalidArgumentException
- name: MessageFormatterInterface
type: class
source: Symfony\Component\Translation\Formatter\MessageFormatterInterface
- name: BaseTranslator
type: class
source: Symfony\Component\Translation\Translator
properties: []
methods:
- name: __construct
visibility: public
parameters:
- name: container
- name: formatter
- name: defaultLocale
- name: loaderIds
default: '[]'
- name: options
default: '[]'
- name: enabledLocales
default: '[]'
comment: "# * @author Fabien Potencier <fabien@symfony.com>\n# *\n# * @final since\
\ Symfony 7.1\n# */\n# class Translator extends BaseTranslator implements WarmableInterface\n\
# {\n# protected array $options = [\n# 'cache_dir' => null,\n# 'debug' => false,\n\
# 'resource_files' => [],\n# 'scanned_directories' => [],\n# 'cache_vary' => [],\n\
# ];\n# \n# /**\n# * @var list<string>\n# */\n# private array $resourceLocales;\n\
# \n# /**\n# * Holds parameters from addResource() calls so we can defer the actual\n\
# * parent::addResource() calls until initialize() is executed.\n# *\n# * @var\
\ array[]\n# */\n# private array $resources = [];\n# \n# /**\n# * @var string[][]\n\
# */\n# private array $resourceFiles;\n# \n# /**\n# * @var string[]\n# */\n# private\
\ array $scannedDirectories;\n# \n# /**\n# * Constructor.\n# *\n# * Available\
\ options:\n# *\n# * * cache_dir: The cache directory (or null to disable\
\ caching)\n# * * debug: Whether to enable debugging or not (false\
\ by default)\n# * * resource_files: List of translation resources available\
\ grouped by locale.\n# * * cache_vary: An array of data that is serialized\
\ to generate the cached catalogue name.\n# *\n# * @param string[] $enabledLocales\n\
# *\n# * @throws InvalidArgumentException"
- name: warmUp
visibility: public
parameters:
- name: cacheDir
- name: buildDir
default: 'null'
comment: null
- name: addResource
visibility: public
parameters:
- name: format
- name: resource
- name: locale
- name: domain
default: 'null'
comment: null
- name: initializeCatalogue
visibility: protected
parameters:
- name: locale
comment: null
- name: doLoadCatalogue
visibility: protected
parameters:
- name: locale
comment: '# * @internal'
- name: initialize
visibility: protected
parameters: []
comment: null
- name: addResourceFiles
visibility: private
parameters: []
comment: null
traits:
- Psr\Container\ContainerInterface
- Symfony\Component\Config\Resource\DirectoryResource
- Symfony\Component\Config\Resource\FileExistenceResource
- Symfony\Component\HttpKernel\CacheWarmer\WarmableInterface
- Symfony\Component\Translation\Exception\InvalidArgumentException
- Symfony\Component\Translation\Formatter\MessageFormatterInterface
interfaces:
- WarmableInterface