2011-08-18 15:57:14 +00:00

19 lines
584 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();
require_once 'Scores/PagePrint.php';
$page = new PagePrint($controller, $action);
if ($page->exportable('xml') && !empty($view->exportObjet)) {
$page->objectToXML($view->exportObjet, $this->_request->getParams());
}
}
}
}