src/Kunstmaan/TranslatorBundle/Service/Translator/Translator.php
public function addResourcesFromDatabaseAndCacheThem($cacheResources = true)
    {
        try {
            $resources = $this->translationRepository->getAllDomainsByLocale();
            $this->addResources($resources);

            if ($cacheResources === true) {
                $this->resourceCacher->cacheResources($resources);
            }
        } catch (\Exception $ex) {
            // don't load if the database doesn't work
        }
    }
public function addResourcesFromDatabaseAndCacheThem($cacheResources = true)
    {
        try {
            $resources = $this->translationRepository->getAllDomainsByLocale();
            $this->addResources($resources);

            if ($cacheResources === true) {
                $this->resourceCacher->cacheResources($resources);
            }
        } catch (\Exception $ex) {
            // don't load if the database doesn't work
        }
    }
public function addResourcesFromDatabaseAndCacheThem ( $ cacheResources = true ) { try { $ resources = $ this -> translationRepository -> getAllDomainsByLocale ( ) ; $ this -> addResources ( $ resources ) ; if ( $ cacheResources === true ) { $ this -> resourceCacher -> cacheResources ( $ resources ) ; } } catch ( \ Exception $ ex ) { // don't load if the database doesn't work } }
Add resources from the stash and cache them

@param bool $cacheResources cache resources after retrieving them from the stasher
Add resources from the stash and cache them