For ease of understanding or just to make our API calls tidier, we may want to use RESTful services. This recipe looks at how we can make our existing services RESTful and how we can leverage these changes in our charts.
To set up the basic Yii project, refer to the Setting up a simple Yii Project recipe from this chapter.
We will also need to download and set up RestfullYii, an extension for the Yii framework using the following steps:
Download the appropriate version of RestfullYii from the RestfullYii page (http://yiiframework.com/extension/restfullyii) and extract the contents to
example_app/protected/extensions
.Add an
aliases
entry inexample_app/protected/config/main.php
as shown in the following code:return array( 'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..', 'name'=>'My Web Application', 'aliases' => array( 'RestfullYii' =>realpath(__DIR__.'/../extensions/starship/RestfullYii'), )...