* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class CityManager extends BaseFrameworkSystem implements ManageableCity {
+class CityManager extends BaseManager implements ManageableCity {
/**
* Protected constructor
*
* @return $isFounded Whether the current user has already founded a city
*/
public function isCityAlreadyFounded () {
- // Default is not found
- $isFounded = FALSE;
+ // Check if the currently set user has already founded a city
+ $isFounded = $this->getWrapperInstance()->ifUserHasFoundedCity();
// Return result
return $isFounded;
}
+
+ /**
+ * Checks whether the given city name is already taken
+ *
+ * @para $cityName Name of city
+ * @return $isTaken Whether the given city name is already taken
+ */
+ public function ifCityNameExists ($cityName) {
+ // Check if the given city name is taken
+ $isTaken = $this->getWrapperInstance()->ifCityExists($cityName);
+
+ // Return result
+ return $isTaken;
+ }
}
// [EOF]