24. Controller
<?php
class AlbumController extends Zend_Controller_Action{
public function init(){
/* Initialize action controller here */
}
public function indexAction(){
/* Your code goes here */
}
}
27. Crud operation
public function addAlbum($data) {
$this->insert($data);
}
public function updateAlbum($data, $where) {
$this->update($data, $where);
}
public function deleteAlbum($where) {
$this->delete($where);
}
28. Zend Frameworks Gems
• Web services
1. Google
2. Amazon
3. Flickr
4. Yahoo
5. More….
30. Zend web service (flickr)
public function flickrAction(){
$flickr = new Zend_Service_Flickr(’YourAPIKey');
$this->view->results = $flickr->tagSearch('worldcup’);
}