Is there a way to perform REST actions in the middle of executing an action? For example, if I perform GET /index.php/book/1
I might receive the following:
[{
"id" : 1,
"title" : "This is a book.",
"owner_id" : 4
}]
But what I'd like to do is before returning the above object, perform a GET /index.php/user/4
so the end result is:
[{
"id" : 1,
"title" : "This is a book.",
"owner" : {
"id" : 4,
"name" : "John Smith",
"age" : 40
}
}]