Last active
November 30, 2015 18:43
-
-
Save tryvin/5c1fc37096b575d63c2a to your computer and use it in GitHub Desktop.
Restful model
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class MyRestfulHandler extends BaseRestfulHandler { | |
/** | |
* @url GET /users | |
*/ | |
public function getusers() { | |
return $userList; | |
} | |
/** | |
* @url POST /users/new | |
*/ | |
public function newUser() { | |
$userData = $this->server->data; | |
} | |
/** | |
* @url DELETE /user/$userId | |
*/ | |
public function deleteUser($userId) { | |
return $this->model->deleteUser($userId); | |
} | |
// Well, you got it! | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment