Пример #1
0
 /**
  * @author Shivam Mathur <*****@*****.**>
  *
  * @return array
  */
 public function Countries()
 {
     $Location = new Location(self::$databaseName, self::$collection);
     $allCountries = $Location->getAllCountries();
     $countries = json_decode($allCountries);
     $data = [];
     foreach ($countries as $countryName) {
         $data[] = [$countryName];
     }
     return $data;
 }
Пример #2
0
<?php

namespace CountryCity\Templates;

use CountryCity\API\Location;
/** @var Location $Location */
$Location = new Location('countrycity', 'geo');
/** @var $data */
echo $Location->getAllCities($data['countryName']);
Пример #3
0
<?php

namespace CountryCity\Templates;

use CountryCity\API\Location;
/** @var Location $Location */
$Location = new Location('countrycity', 'geo');
echo $Location->getAllCountries();