samedi 7 mars 2015

Ember JS rest adapter and php files

so im looking at the ember js documentation, and im a bit confused about how to use the adapter here:


http://ift.tt/1oQNAH2


Now it says, for example, that if I want to use the find method then,


"The REST adapter will automatically send a GET request to /photos/1."


But i don't understand how this url is supposed to trigger a php file to return some data. It looks like its trying to go to a file called 1 without an extension in the photos directory. So what would a php file look like (in terms of directory) which would be triggered by this? Does it somehow just figure out the extension in order to be generic to any rest endpoint? Any help would be greately appreciated.


So lets say I had a php file called test.php in the photos directory.


I'm completely new to ember data so sorry if this a newb question.


It would be really nice if there was a simple example project that used php and ember together, but I've only found tutorials talking about the ember side.





Aucun commentaire:

Enregistrer un commentaire