<?php

header('Content-type: text/plain');
require_once dirname(__FILE__) . '/../rest_controladoras/ItemControllerRest.php';
$ic = ItemControllerRest::getInstance();
foreach ($_GET as $key => $value) {
    $item = $ic->getItemById($value, $key);
    echo $item;
    return;
}
$items = $ic->getAllItems();
echo $items;