Esempio n. 1
0
$ProvinceName = $provincebyId->getProvinceName();
$CountryId = $provincebyId->getCountryId();
echo "The Country  is: " . $ProvinceName . "<br>";
//getProvinceByName
$provincebyId = $LocationManager->getProvinceByName("balkh");
echo "<br/><br/><br/><b>Provice by Name</b><br>";
$provinceid = $provincebyId->getProvinceId();
$ProvinceName = $provincebyId->getProvinceName();
$CountryId = $provincebyId->getCountryId();
echo "The Country  is: " . $ProvinceName . "<br>";
$citybyid = $LocationManager->getCityById(1);
echo "<br/><br/><br/><b>CITYBY ID</b><br>";
$cityid = $citybyid->getCityId();
$cityname = $citybyid->getCityName();
echo "The Country  is: " . $cityname . "<br>";
$citybyid = $LocationManager->getCityByName("Toronto");
echo "<br/><br/><br/><b>CITYBY name</b><br>";
$cityid = $citybyid->getCityId();
$cityname = $citybyid->getCityName();
echo "The Country  is: " . $cityname . "<br>";
//getAddressesByCityId
$addressbycityid = $LocationManager->getAddressesByCityId($cityid);
echo "<br/><br/><br/><b>ADDRESSES BY CITY</b><br>";
$userCount = count($addressbycityid);
echo "Address:<br>";
if ($userCount > 0) {
    foreach ($addressbycityid as $add) {
        $addressid = $add->getAddressId();
        $address = $add->getAddress();
        $postalcode = $add->getPostalCode();
        echo $address . "<br>";