Class TerritoryCollection
Representation of a territory collection.
```php
<?php
$territories = new TerritoryCollection($cldr);
or
$territories = $cldr->territories;
// check if a territory is defined
isset($territories['FR']); // true
isset($territories['UnDiFiNeD']); // false
-
ICanBoogie\CLDR\TerritoryCollection
implements
ArrayAccess
uses
ICanBoogie\Accessor\AccessorTrait (not available)
ICanBoogie\CLDR\RepositoryPropertyTrait,
ICanBoogie\CLDR\CollectionTrait
Methods summary
public
offsetExists( string $code
)
: boolean
Checks if a territory is defined.
Checks if a territory is defined.
Parameters
$code
- Territory ISO code.
Returns
boolean
true
if the territory is defined, false
otherwise.
Implementation of
ArrayAccess::offsetExists()
public
offsetGet( string $code
)
: ICanBoogie\CLDR\Territory
Returns a territory.
Parameters
$code
- Territory ISO code.
Returns
Implementation of
ArrayAccess::offsetGet()
public
assert_defined( string $code
)
Asserts that a territory is defined.
Asserts that a territory is defined.
Parameters
Throws
Methods inherited from ArrayAccess
offsetSet()
,
offsetUnset()
get_repository()
offsetSet()
,
offsetUnset()
Properties summary
$repository