* * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ /** * PhpFileLoader loads translations from PHP files returning an array of translations. * * @author Fabien Potencier */ class PhpFileLoader extends ArrayLoader implements LoaderInterface { /** * {@inheritdoc} */ public function load($resource, $locale, $domain = 'messages') { $messages = require($resource); $catalogue = parent::load($messages, $locale, $domain); $catalogue->addResource(new FileResource($resource)); return $catalogue; } }