File: D:/HostingSpaces/farmfun/reserveren.farmfun.be/app/Komma/Globalization/AbstractCultureParser.php
<?php
namespace App\Komma\Globalization;
/**
* Class AbstractCultureParser
*
* Can parse a culture name
* Based of the C# variant
*/
abstract class AbstractCultureParser
{
/** @var string ISO 15924 script */
protected $scriptTagCountry = '';
/** @var string two letter language code or a three-letter code derived from ISO 639-2 if not available */
protected $languageIso2 = '';
/** @var string two letter country/regioncode2 */
protected $countryOrRegionCode2 = '';
/** @var string */
protected $name = '';
/**
* Parses a name and extracts culture and region info from it
*
* @param string $name
*/
abstract protected function parseName(string $name);
/**
* AbstractCultureParser constructor.
*
* Use this function to get a new instance or cached instance of this class.
*
* The format for the culture name based on RFC 4646 is languagecode2>-country/regioncode2, where languagecode2 is the two-letter
* language code and country/regioncode2 is the two-letter subculture code. Examples include ja-JP for Japanese (Japan)
* and en-US for English (United States). In cases where a two-letter language code is not available,
* a three-letter code derived from ISO 639-2 is used.
*
* Notice that some culture names also specify an ISO 15924 script. For example, Cyrl specifies the Cyrillic script
* and Latn specifies the Latin script. A culture name that includes a script uses the pattern languagecode2-scripttag-country/regioncode2.
* An example of this type of culture name is uz-Cyrl-UZ for Uzbek (Cyrillic, Uzbekistan).
*
* A neutral culture is specified by only the two-letter lowercase language code. For example, fr specifies the neutral culture for French, and de specifies the neutral culture for German.
*
* @param string $name
* @return AbstractCultureParser|null
*/
abstract public static function getInstance(string $name);
/**
* AbstractCultureParser constructor.
*
* Is protected to prevent construction using the constructor. Use getInstance instead.
*/
abstract protected function __construct();
}