PHP Class Kdyby\Translation\CatalogueCompiler

Author: Filip Procházka ([email protected])
Inheritance: extends Nette\Object
Afficher le fichier Open project: kdyby/translation Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( Nette\Caching\IStorage $cacheStorage, FallbackResolver $fallbackResolver, CatalogueFactory $catalogueFactory )
addResource ( string $format, string $resource, string $locale, string | null $domain = NULL )
compile ( Translator $translator, array &$availableCatalogues, string $locale ) : Symfony\Component\Translation\MessageCatalogueInterface | null
enableDebugMode ( ) Replaces cache storage with simple memory storage (per-request).
invalidateCache ( )

Méthodes protégées

Méthode Description
compilePhpCache ( Translator $translator, array &$availableCatalogues, string $locale ) : string
load ( )

Method Details

__construct() public méthode

public __construct ( Nette\Caching\IStorage $cacheStorage, FallbackResolver $fallbackResolver, CatalogueFactory $catalogueFactory )
$cacheStorage Nette\Caching\IStorage
$fallbackResolver FallbackResolver
$catalogueFactory CatalogueFactory

addResource() public méthode

public addResource ( string $format, string $resource, string $locale, string | null $domain = NULL )
$format string
$resource string
$locale string
$domain string | null

compile() public méthode

public compile ( Translator $translator, array &$availableCatalogues, string $locale ) : Symfony\Component\Translation\MessageCatalogueInterface | null
$translator Translator
$availableCatalogues array
$locale string
Résultat Symfony\Component\Translation\MessageCatalogueInterface | null

compilePhpCache() protected méthode

protected compilePhpCache ( Translator $translator, array &$availableCatalogues, string $locale ) : string
$translator Translator
$availableCatalogues array
$locale string
Résultat string

enableDebugMode() public méthode

Replaces cache storage with simple memory storage (per-request).
public enableDebugMode ( )

invalidateCache() public méthode

public invalidateCache ( )

load() protected static méthode

protected static load ( )