示例#1
0
	public static function getDefault()
	{
		if (!defined('LPC_default_language'))
			throw new RuntimeException("You have to define constant LPC_default_language if you want to rely on LPC defaults.");

		if (isset(self::$defaultInstance))
			return self::$defaultInstance;
		$lang=self::newLanguage(LPC_default_language);
		if (!$lang->probe())
			throw new RuntimeException("No entry found in the languages table for the default language code (constant LPC_default_language=\"".LPC_default_language."\")");
		self::$defaultInstance=$lang;
		return self::$defaultInstance;
	}