Kdyby\Translation\TranslationLoader::loadResource PHP Method

loadResource() public method

public loadResource ( string $format, string $resource, string $domain, Symfony\Component\Translation\MessageCatalogue $catalogue )
$format string
$resource string
$domain string
$catalogue Symfony\Component\Translation\MessageCatalogue
    public function loadResource($format, $resource, $domain, MessageCatalogue $catalogue)
    {
        if (!isset($this->loaders[$format])) {
            if (!isset($this->serviceIds[$format])) {
                throw new LoaderNotFoundException(sprintf('The "%s" translation loader is not registered.', $resource[0]));
            }
            $this->loaders[$format] = $this->serviceLocator->getService($this->serviceIds[$format]);
            unset($this->serviceIds[$format]);
        }
        $catalogue->addCatalogue($this->loaders[$format]->load($resource, $catalogue->getLocale(), $domain));
    }