2013-11-29 13:54:52 +00:00

18 lines
548 B
PHP

<?php
class Application_Controller_Plugin_Xml extends Zend_Controller_Plugin_Abstract
{
public function dispatchLoopShutdown()
{
$layout = Zend_Layout::getMVCInstance();
if ($layout->isEnabled()) {
$controller = $this->_request->getControllerName();
$action = $this->_request->getActionName();
$view = $layout->getView();
$page = new Scores_Export_Print($controller, $action);
if ($page->exportable('xml') && !empty($view->exportObjet)) {
$page->objectToXML($view->exportObjet, $this->_request->getParams());
}
}
}
}