У меня есть вопрос относительно структуры.Я основал свой CRUD на вашем живом примере.У меня есть этот URL:
http://mydomain.com/test/index.php/api/t1/module1/username@mail.com?query1=mama&query2=papa
В моем файле api.php я использовал метод GET для этого запроса:
public function __construct(){
$this->dp = new Control();
}
public function get($id=NULL, $id2=NULL, $id3=NULL, $id4=NULL)
{
switch($id)
{
case "t1":
return $this->dp->t1(func_get_args());
break;
case "t2":
return $this->dp->t2(func_get_args());
break;
default:
throw new RestException(400);
break;
}
}
Затем на моем control.php ,
public function t1($numbers) {
print_r($numbers);
}
Тело ответа:
Array ([0] => t1 [1] => module1 [2] =>username@mail.com [3] =>)
Чего я хочу добиться здесь - это получить значения query1 и query2 ?Как я могу это сделать?
Спасибо.