コード例 #1
0
         echo '</pre>';
     } else {
         echo "A problem ocurred while trying to get a user by ID";
     }
 }
 if ($user != null) {
     if ($UserUtil->removeUser($user)) {
         echo '<strong>UserUtil->remove()</strong>';
         echo '<br />OK';
     } else {
         echo "A problem ocurred while trying to remove the user from the database";
     }
 }
 echo "<br /><br />";
 $building = new Building(null, 'example', '*****@*****.**');
 $building = $BuildingUtil->create($building);
 if ($building != null) {
     echo '<strong>BuildingUtil->create()</strong>';
     echo '<pre>';
     print_r($building);
     echo '</pre>';
 } else {
     echo "A problem ocurred while trying to create the building";
 }
 if ($building != null) {
     $id = $building->getId();
     $building2 = $BuildingUtil->getBuildingById($id);
     if ($building2 != null) {
         echo '<strong>BuildingUtil->getBuildingById()</strong>';
         echo '<pre>';
         print_r($building2);