Contao\CoreBundle\Config\Loader\XliffFileLoader::load PHP Méthode

load() public méthode

Reads the contents of a XLIFF file and returns the PHP code.
public load ( string $file, string | null $type = null ) : string
$file string
$type string | null
Résultat string
    public function load($file, $type = null)
    {
        return $this->convertXlfToPhp($file, $type ?: 'en');
    }

Usage Example

 /**
  * Tests loading a file with too many nesting levels.
  *
  * @expectedException \OutOfBoundsException
  */
 public function testTooManyLevels()
 {
     $loader = new XliffFileLoader($this->getRootDir() . '/app', false);
     $loader->load($this->getRootDir() . '/vendor/contao/test-bundle/Resources/contao/languages/en/error.xlf', 'en');
 }
All Usage Examples Of Contao\CoreBundle\Config\Loader\XliffFileLoader::load