コード例 #1
0
ファイル: BaseCountry.php プロジェクト: homer6/blank_altumo
 /**
  * @param	State $state The state object to add.
  */
 protected function doAddState($state)
 {
     $this->collStates[] = $state;
     $state->setCountry($this);
 }
コード例 #2
0
<?php

require_once __DIR__ . "/../../../Backend/SessionManager.php";
require_once __DIR__ . "/../../../Backend/CityManager.php";
if (!isset($_GET) || $_GET["nameState"] === NULL) {
    echo "KO";
    die;
}
$state = new State();
$state->setName($_GET["nameState"]);
$state->setShortName($_GET["shortState"]);
$state->setCountry($_GET["country"]);
if (CityManager::addState($state)) {
    echo "OK";
} else {
    echo "KO";
}