Renamed languages to locales in the code

This commit is contained in:
Gregory Oschwald
2013-10-17 12:58:21 -07:00
parent b8188bc558
commit 234dcaff7c
13 changed files with 46 additions and 39 deletions
+6 -6
View File
@@ -4,14 +4,14 @@ namespace GeoIp2\Record;
abstract class AbstractPlaceRecord extends AbstractRecord
{
private $languages;
private $locales;
/**
* @ignore
*/
public function __construct($record, $languages)
public function __construct($record, $locales)
{
$this->languages = $languages;
$this->locales = $locales;
parent::__construct($record);
}
@@ -29,9 +29,9 @@ abstract class AbstractPlaceRecord extends AbstractRecord
private function name()
{
foreach ($this->languages as $language) {
if (isset($this->names[$language])) {
return $this->names[$language];
foreach ($this->locales as $locale) {
if (isset($this->names[$locale])) {
return $this->names[$locale];
}
}
}
+1 -1
View File
@@ -14,7 +14,7 @@ namespace GeoIp2\Record;
* @property int $geonameId The GeoName ID for the city. This attribute
* is returned by all end points.
*
* @property string $name The name of the city based on the languages list
* @property string $name The name of the city based on the locales list
* passed to the constructor. This attribute is returned by all end points.
*
* @property array $names A array map where the keys are locale codes
+1 -1
View File
@@ -14,7 +14,7 @@ namespace GeoIp2\Record;
* is returned by all end points.
*
* @property string $name Returns the name of the continent based on the
* languages list passed to the constructor. This attribute is returned by
* locales list passed to the constructor. This attribute is returned by
* all end points.
*
* @property array $names An array map where the keys are locale codes
+1 -1
View File
@@ -18,7 +18,7 @@ namespace GeoIp2\Record;
* two-character ISO 3166-1 alpha code} for the country. This attribute is
* returned by all end points.
*
* @property string $name The name of the country based on the languages list
* @property string $name The name of the country based on the locales list
* passed to the constructor. This attribute is returned by all end points.
*
* @property array $names An array map where the keys are locale codes and
+1 -1
View File
@@ -22,7 +22,7 @@ namespace GeoIp2\Record;
* two-character ISO 3166-1 alpha code} for the country. This attribute is
* returned by all end points.
*
* @property string $name The name of the country based on the languages list
* @property string $name The name of the country based on the locales list
* passed to the constructor. This attribute is returned by all end points.
*
* @property array $names An array map where the keys are locale codes and
+1 -1
View File
@@ -20,7 +20,7 @@ namespace GeoIp2\Record;
* http://en.wikipedia.org/wiki/ISO_3166-2 ISO 3166-2 code}. This attribute
* is returned by all end points except Country.
*
* @property string $name The name of the subdivision based on the languages
* @property string $name The name of the subdivision based on the locales
* list passed to the constructor. This attribute is returned by all end
* points except Country.
*