ZenMagick 0.9.1


org.zenmagick.service.ZMCountries

Class ZMCountries

ZMObject
|
+--ZMCountries

public class ZMCountries
extends ZMObject

Countries.

Author:
mano
Version:
$Id: ZMCountries.php 957 2008-03-30 21:03:12Z DerManoMann $

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.ZMObject
backtrace, create, log, singleton

Constructor Detail

ZMCountries

public ZMCountries()

Create new instance. /


Method Detail

getCountries

public array getCountries()

Get a list of all countries.

Returns:
A list of ZMCountry objects.

getCountryForId

public ZMCountry getCountryForId(int id)

Get country for the given id.

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

getCountryForName

public ZMCountry getCountryForName(string name)

Get country for the given name.

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

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.

getZonesForCountryId

public array getZonesForCountryId(int countryId)

Get all zones for the given country id.

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

instance

public static void instance()

Get instance. /


ZenMagick 0.9.1