11. Countries

Eden comes with general country static data for several countries around the world. To get a list of countries for example you can use the following example.

Figure 1. Country List
$countries = eden('template')->getList();
echo $countries['US']; //--> United States

United States

eden('template')->us()->getTerritories();			//returns a list of US Territories
eden('template')->us()->getStates();				//returns a lis of US States
eden('template')->us()->getStateFromPostal(94107); 	//--> CA

United Kingdom

eden('template')->uk()->getCounties();	//returns a list of UK Counties


eden('template')->ca()->getTerritories(); //returns a list of Canadian Territories


eden('template')->au()->getTerritories(); //returns a list of Australian Territories

Currently a never ending section of statistical data, we will be adding more country data in the future. Eden internationalization (i18n) doesn't stop at countries. We also have a robust set of methods correctly syncing timezones. Please read 12. Timezones for more information.

© 2012 Openovate Labs. All rights reserved.