-
Book Overview & Buying
-
Table Of Contents
RESS Essentials
Our "RESTful" interface will consist of a few paths as follows:
GET /photos: To load a list of all photos
GET /photos/:id: To load photos and information
GET /photos/country/:name: To load a list of all photos that belong to a country
GET /photos/countries/: To load a list of all the countries
POST /photos: To add a new photo
DELETE /photos/:id: To delete a photo
We can use one of the many "RESTful" frameworks out there to speed up building our application. I decided to use Slim, available at http://www.slimframework.com/, for its simplicity. To integrate it with our framework, we put the Slim library into the app\libs\ directory and load it from the rest_slim module. This module, consisting of the class Rest_Slim (in the app/rest_slim directory), will also load the Responsive_Images module and create database connections. The following constructor is responsible for creating the required environment:
private function __construct(...
Change the font size
Change margin width
Change background colour