Mage_Directory_Model_Country_Api Class Reference

Inheritance diagram for Mage_Directory_Model_Country_Api:

Mage_Api_Model_Resource_Abstract Mage_Directory_Model_Country_Api_V2

List of all members.

Public Member Functions

 items ()


Detailed Description

Definition at line 34 of file Api.php.


Member Function Documentation

items (  ) 

Retrieve countries list

Returns:
array

Definition at line 41 of file Api.php.

00042     {
00043         $collection = Mage::getModel('directory/country')->getCollection();
00044 
00045         $result = array();
00046         foreach ($collection as $country) {
00047             /* @var $country Mage_Directory_Model_Country */
00048             $country->getName(); // Loading name in default locale
00049             $result[] = $country->toArray(array('country_id', 'iso2_code', 'iso3_code', 'name'));
00050         }
00051 
00052         return $result;
00053     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:24:07 2009 for Magento by  doxygen 1.5.8