protected function loadData($locale, $format)
	{
		if (!isset($this->dataCache[$locale][$format]))
		{
			
			$file = sprintf('%s/%s/language.'.$format, $this->dataDir, $locale);

			if (!is_file($file))
			{
				throw new \RuntimeException(sprintf('Unable to load the language data file "%s"', $file));
			}

			$this->dataCache[$locale][$format] = ($format == 'php') ? require $file : file_get_contents($file);
		}

		return $this->sortData($locale, $this->dataCache[$locale][$format]);
	}
protected function loadData($locale, $format)
	{
		if (!isset($this->dataCache[$locale][$format]))
		{
			
			$file = sprintf('%s/%s/language.'.$format, $this->dataDir, $locale);

			if (!is_file($file))
			{
				throw new \RuntimeException(sprintf('Unable to load the language data file "%s"', $file));
			}

			$this->dataCache[$locale][$format] = ($format == 'php') ? require $file : file_get_contents($file);
		}

		return $this->sortData($locale, $this->dataCache[$locale][$format]);
	}
protected function loadData ( $ locale , $ format ) { if ( ! isset ( $ this -> dataCache [ $ locale ] [ $ format ] ) ) { $ file = sprintf ( '%s/%s/language.' . $ format , $ this -> dataDir , $ locale ) ; if ( ! is_file ( $ file ) ) { throw new \ RuntimeException ( sprintf ( 'Unable to load the language data file "%s"' , $ file ) ) ; } $ this -> dataCache [ $ locale ] [ $ format ] = ( $ format == 'php' ) ? require $ file : file_get_contents ( $ file ) ; } return $ this -> sortData ( $ locale , $ this -> dataCache [ $ locale ] [ $ format ] ) ; }
A lazy-loader that loads data from a PHP file if it is not stored in memory yet.

@param string $locale  The locale
@param string $format  The format (default: php)
@return array          An array (list) with language
A lazy - loader that loads data from a PHP file if it is not stored in memory yet .