/** * Test method. * * @expectedException \ElKuKu\G11n\G11nException * * @return void */ public function testUndefinedDomain() { ExtensionHelper::getDomainPath('{undefined}'); }
/** * Get the language template path. * * @param string $extension Extension name. * @param string $scope Extension scope * * @return string */ public static function getTemplatePath($extension, $scope) { static $templates = array(); if (array_key_exists($extension, $templates) && array_key_exists($scope, $templates[$extension])) { return $templates[$extension][$scope]; } $base = ExtensionHelper::getDomainPath($scope); $fileName = $extension . '.pot'; $extensionDir = ExtensionHelper::getExtensionPath($extension); return "{$base}/{$extensionDir}/" . ExtensionHelper::$langDirName . "/templates/{$fileName}"; }