Bcp47Code
Simple interface representing languages which have a BCP 47 code
|
This is a simple value object demonstrating the simplest possible implementation of the Bcp47Code interface. More...
Public Member Functions | |
__construct (string $bcp47code) | |
Create a new instance of this value object representing a language with the given BCP 47 code. | |
toBcp47Code () | |
@inheritDoc | |
isSameCodeAs (Bcp47Code $other) | |
@inheritDoc | |
__toString () | |
Static Public Member Functions | |
static | fromBcp47Code (Bcp47Code $language) |
Simple helper to coerce any Bcp47Code into a Bcp47CodeValue. | |
static | isSameCode (Bcp47Code $a, Bcp47Code $b) |
Simple helper to compare Bcp47Code in the proper case-insensitive manner. | |
This is a simple value object demonstrating the simplest possible implementation of the Bcp47Code interface.
Wikimedia\Bcp47Code\Bcp47CodeValue::__construct | ( | string | $bcp47code | ) |
Create a new instance of this value object representing a language with the given BCP 47 code.
string | $bcp47code | the BCP 47 code for the language |
|
static |
Simple helper to coerce any Bcp47Code into a Bcp47CodeValue.
Bcp47Code | $language | an object representing a language |
Simple helper to compare Bcp47Code in the proper case-insensitive manner.
Bcp47Code | $a | |
Bcp47Code | $b |
Wikimedia\Bcp47Code\Bcp47CodeValue::isSameCodeAs | ( | Bcp47Code | $other | ) |
@inheritDoc
Implements Wikimedia\Bcp47Code\Bcp47Code.
Wikimedia\Bcp47Code\Bcp47CodeValue::toBcp47Code | ( | ) |
@inheritDoc
Implements Wikimedia\Bcp47Code\Bcp47Code.