Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Controller - RESTful Test
- * Point d'entrée pour les webservices du projet StudentCo
- * @param method la méthode appelée dans bl.php_user_filter
- * @param ...les autres paramètres nécessaires suivant l'appel
- */
- require_once ('StudentCoRestHandler.class.php');
- $method = "";
- if(isset($_GET["method"])) $method = $_GET["method"];
- //controls the RESTful services - URL mapping
- switch ($method) {
- case "authenticate":
- //to handle REST Url
- $studentcoRestHandler = new StudentcoRestHandler();
- $username = $_GET["username"];
- $password = $_GET["password"];
- $studentcoRestHandler->restAuthenticate($username , $password);
- break;
- case "" :
- //404 - not found;
- break;
- }
Add Comment
Please, Sign In to add comment