ZenMagick 0.9.8


org.zenmagick.store.services.account.ZMCountries
\store\services\account\ZMCountries.php at line 34

Class ZMCountries

ZMObject
└─ZMCountries

public class ZMCountries
extends ZMObject

Countries.

Author:
DerManoMann
Version:
$Id: ZMCountries.php 2694 2009-12-03 22:32:18Z dermanomann $

Fields inherited from org.zenmagick.core.ZMObject
properties_
Constructor Summary

ZMCountries()

Create new instance.

Method Summary
array

getCountries()

Get a list of all countries.

ZMCountry

getCountryForId(int id)

Get country for the given id.

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
attachMethod, get, getAttachedMethods, getPropertyNames, set, singleton

Constructor Detail

\store\services\account\ZMCountries.php at line 41

ZMCountries

public ZMCountries()

Create new instance.


Method Detail

\store\services\account\ZMCountries.php at line 82

getCountries

public array getCountries()

Get a list of all countries.

Returns:
A list of ZMCountry objects.

\store\services\account\ZMCountries.php at line 99

getCountryForId

public ZMCountry getCountryForId(int id)

Get country for the given id.

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

\store\services\account\ZMCountries.php at line 67

getCountryForName

public ZMCountry getCountryForName(string name)

Get country for the given name.

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

\store\services\account\ZMCountries.php at line 118

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.

\store\services\account\ZMCountries.php at line 134

getZonesForCountryId

public array getZonesForCountryId(int countryId)

Get all zones for the given country id.

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

\store\services\account\ZMCountries.php at line 56

instance

public static void instance()

Get instance.


ZenMagick 0.9.8