ZenMagick 0.9.10


zenmagick.store.shared.services.account\ZMCountries
services\account\ZMCountries.php at line 33

Class ZMCountries

ZMObject
└─ZMCountries

public class ZMCountries
extends ZMObject

Countries.

Author:
DerManoMann

Fields inherited from org.zenmagick.core\ZMObject
properties_
Method Summary
void

__construct()

Create new instance.

array

getCountries()

Get a list of all countries.

ZMCountry

getCountryForId(int id)

Get country for the given id.

ZMCountry

getCountryForIsoCode2(string code)

Get country for the given ISO code2.

ZMCountry

getCountryForName(string name)

Get country for the given name.

string

getZoneCode(int countryId, int zoneId, string defaultZone)

Get the zone code for the given country and zone id.

array

getZonesForCountryId(int countryId)

Get all zones for the given country id.

static void

instance()

Get instance.

Methods inherited from org.zenmagick.core\ZMObject
__construct, attachMethod, get, getAttachedMethods, getProperties, getPropertyNames, set, singleton

Method Detail

services\account\ZMCountries.php at line 40

__construct

public void __construct()

Create new instance.


services\account\ZMCountries.php at line 81

getCountries

public array getCountries()

Get a list of all countries.

Returns:
A list of ZMCountry objects.

services\account\ZMCountries.php at line 98

getCountryForId

public ZMCountry getCountryForId(int id)

Get country for the given id.

Parameters:
id - The country id.
Returns:
The country or null.

services\account\ZMCountries.php at line 114

getCountryForIsoCode2

public ZMCountry getCountryForIsoCode2(string code)

Get country for the given ISO code2.

Parameters:
code - The country code.
Returns:
The country or null.

services\account\ZMCountries.php at line 66

getCountryForName

public ZMCountry getCountryForName(string name)

Get country for the given name.

Parameters:
name - The country name.
Returns:
The country or null.

services\account\ZMCountries.php at line 133

getZoneCode

public string getZoneCode(int countryId, int zoneId, string defaultZone)

Get the zone code for the given country and zone id.

Parameters:
countryId - The country id.
zoneId - The zone id.
defaultZone - Optional default value; default is ''.
Returns:
The zone code or the provided default value.

services\account\ZMCountries.php at line 149

getZonesForCountryId

public array getZonesForCountryId(int countryId)

Get all zones for the given country id.

Parameters:
countryId - The country id.
Returns:
List of ZMZone objects.

services\account\ZMCountries.php at line 55

instance

public static void instance()

Get instance.


ZenMagick 0.9.10