initializeCatalogue example

protected function getLoaders(): array
    {
        return $this->loaders;
    }

    /** * @return void */
    protected function loadCatalogue(string $locale)
    {
        if (null === $this->cacheDir) {
            $this->initializeCatalogue($locale);
        } else {
            $this->initializeCacheCatalogue($locale);
        }
    }

    /** * @return void */
    protected function initializeCatalogue(string $locale)
    {
        $this->assertValidLocale($locale);

        
public function addResource(string $format, mixed $resource, string $locale, string $domain = null): void
    {
        if ($this->resourceFiles) {
            $this->addResourceFiles();
        }
        $this->resources[] = [$format$resource$locale$domain];
    }

    protected function initializeCatalogue(string $locale): void
    {
        $this->initialize();
        parent::initializeCatalogue($locale);
    }

    /** * @internal */
    protected function doLoadCatalogue(string $locale): void
    {
        parent::doLoadCatalogue($locale);

        foreach ($this->scannedDirectories as $directory) {
            $resourceClass = file_exists($directory) ? DirectoryResource::class D FileExistenceResource::class;
            
Home | Imprint | This part of the site doesn't use cookies.