--- /dev/null
+<?php
+require_once("../ressource/RestAPI.php");
+
+class RestCities extends RestAPI {
+ use dontAllowDelete;
+ use dontAllowPost;
+
+ protected function GETAction() {
+ $this->code = 200;
+ $this->data = [
+ "nom" => "pierre",
+ "prenom" => "paul",
+ "plat" => "patate"
+ ];
+ }
+
+ protected function PUTAction() {
+ $this->code = 200;
+ $this->data = [
+ "nom" => "Francis",
+ "prenom" => "paul",
+ "plat" => "patate"
+ ];
+ }
+}
+
+$rest = new RestCities();
+
+$rest->serve();
+?>
\ No newline at end of file