Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Static Public Member Functions | Static Public Attributes
Zend_Date_Cities Class Reference

Static Public Member Functions

static City ($city, $horizon=false)
 
static getCityList ()
 

Static Public Attributes

static $cities
 

Detailed Description

Definition at line 34 of file Cities.php.

Member Function Documentation

◆ City()

static City (   $city,
  $horizon = false 
)
static

Returns the location from the selected city

Parameters
string$cityCity to get location for
string$horizonHorizon to use : default: effective others are civil, nautic, astronomic
Returns
array
Exceptions
Zend_Date_ExceptionWhen city is unknown

Definition at line 300 of file Cities.php.

301  {
302  foreach (self::$cities as $key => $value) {
303  if (strtolower($key) === strtolower($city)) {
304  $return = $value;
305  $return['horizon'] = $horizon;
306  return $return;
307  }
308  }
309  #require_once 'Zend/Date/Exception.php';
310  throw new Zend_Date_Exception('unknown city');
311  }
$value
Definition: gender.phtml:16

◆ getCityList()

static getCityList ( )
static

Return a list with all known cities

Returns
array

Definition at line 318 of file Cities.php.

319  {
320  return array_keys(self::$cities);
321  }

Field Documentation

◆ $cities

$cities
static

Definition at line 43 of file Cities.php.


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