Thank you very much. However, as I have mentioned, I would like to use RESTful & JSON instead of SOAP… I think SOAP is heavy. Anyway, thanks a lot. I have 2 days left to figure it out. If I can’t find the solution. I have to use SOAP…
I think I understand your approach. My question is where should I call this method if I create this kind of code in the controller. Maybe my problem is I don’t understand the Yii work flow clearly. I need to keep the original View code because there’s user interface in the web side. Meanwhile, I would like this server provides interface for Android App by POST/GET url. Similar like twitter API…
Thank you DarkNSF. And I have solved that problem by that solution. I create an action in the controller and echo the JSON code.
* Lists all reports general info based on the professor login_ece, in json format.
public function actionRapportList()
foreach ($dataProvider->getData() as $var)
$arr = array(
'student_fullname'=>$var->etudiant->nom .' '. $var->etudiant->prenom,
Now I have two questions left:
Since I need to create each action twice for Web side and for Android. They use different url. Is there other solution?
As in the code, I use ActiveDataProvider and get the “Stage” object. But I can’t find a way to get the ONLY columns I need… So I have to use a loop and select the columns in each data. Is that possible to do that select job in the provider?