%PDF- %PDF-
Direktori : /www/varak.net/catalog.varak.net/app/presenters/ |
Current File : //www/varak.net/catalog.varak.net/app/presenters/DataPresenter.php |
<?php class DataPresenter extends BasePresenter { private $model; public function injectModels(Bookshelf $model) { $this->model = $model; } public function startup() { parent::startup(); // Set right content-type $httpResponse = $this->getService('httpResponse'); $httpResponse->setContentType('text/xml', 'UTF-8'); } public function renderDefault() { } public function renderAuthors() { $this->template->data = $this->model->getAuthorsRaw(); } public function renderGenres() { $this->template->data = $this->model->getGenresRaw(); } public function renderLanguages() { $this->template->data = $this->model->getLanguagesRaw(); } }