<?php

require_once("MobileRestHandler.php");
$view = "";
if(isset($_GET["view"]))
$view = $_GET["view"];
/*

controls the RESTful services

URL mapping

*/

switch($view){
	case "all":
		// to handle REST Url /mobile/list/
		$mobileRestHandler = new MobileRestHandler();
		$mobileRestHandler->getItems();
		break;
	case "inventarios":
		// to handle REST Url /mobile/list/
		$mobileRestHandler = new MobileRestHandler();
		$mobileRestHandler->getInventarios();
		break;
    case "tiendas":
		// to handle REST Url /mobile/list/
		$mobileRestHandler = new MobileRestHandler();
		$mobileRestHandler->getTiendas();
		break;	
	case "usuarios":
		// to handle REST Url /mobile/list/
		$mobileRestHandler = new MobileRestHandler();
		$mobileRestHandler->getUsuarios();
		break;	
    case "clientes":
			// to handle REST Url /mobile/list/
			$mobileRestHandler = new MobileRestHandler();
			$mobileRestHandler->getClientes();
			break;	
	case "" :
		//404 - not found;
		break;
}
?>