2011-05-24 06:25:58 +00:00
|
|
|
<?php
|
|
|
|
class Application_Controller_Plugin_Xml extends Zend_Controller_Plugin_Abstract
|
|
|
|
{
|
|
|
|
public function dispatchLoopShutdown()
|
|
|
|
{
|
|
|
|
$layout = Zend_Layout::getMVCInstance();
|
2011-08-18 15:57:14 +00:00
|
|
|
if ($layout->isEnabled()) {
|
|
|
|
$controller = $this->_request->getControllerName();
|
|
|
|
$action = $this->_request->getActionName();
|
2011-05-24 06:25:58 +00:00
|
|
|
$view = $layout->getView();
|
2011-08-18 15:57:14 +00:00
|
|
|
|
|
|
|
require_once 'Scores/PagePrint.php';
|
2011-05-24 06:25:58 +00:00
|
|
|
$page = new PagePrint($controller, $action);
|
|
|
|
if ($page->exportable('xml') && !empty($view->exportObjet)) {
|
|
|
|
$page->objectToXML($view->exportObjet, $this->_request->getParams());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|