From ce204cefc6f17784e9cbdea9e990a26602a11955 Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Mon, 25 Nov 2013 09:23:52 +0000 Subject: [PATCH] Autoloading : Add Export (Print) to a new class --- library/Application/Controller/Plugin/Menu.php | 2 +- library/Application/Controller/Plugin/Pdf.php | 2 +- library/Application/Controller/Plugin/Xml.php | 2 +- library/Scores/{PagePrint.php => Export/Print.php} | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename library/Scores/{PagePrint.php => Export/Print.php} (99%) diff --git a/library/Application/Controller/Plugin/Menu.php b/library/Application/Controller/Plugin/Menu.php index 4977fe03f..fd90a7ea0 100644 --- a/library/Application/Controller/Plugin/Menu.php +++ b/library/Application/Controller/Plugin/Menu.php @@ -57,7 +57,7 @@ class Application_Controller_Plugin_Menu extends Zend_Controller_Plugin_Abstract } else { //Gestion affichage Lien Print / PDF / XML - $page = new Scores_PagePrint($controller, $action); + $page = new Scores_Export_Print($controller, $action); if ($page->exportable('print')){ $view->print = $page->filename('print', $request->getParams()); diff --git a/library/Application/Controller/Plugin/Pdf.php b/library/Application/Controller/Plugin/Pdf.php index 432d18099..d0b3d04c4 100644 --- a/library/Application/Controller/Plugin/Pdf.php +++ b/library/Application/Controller/Plugin/Pdf.php @@ -8,7 +8,7 @@ class Application_Controller_Plugin_Pdf extends Zend_Controller_Plugin_Abstract $controller = $this->_request->getControllerName(); $action = $this->_request->getActionName(); - $page = new Scores_PagePrint($controller, $action); + $page = new Scores_Export_Print($controller, $action); if ($page->exportable('pdf')){ $layout = $this->_response->getBody(); $filename = $page->filename('pdf', $this->_request->getParams()); diff --git a/library/Application/Controller/Plugin/Xml.php b/library/Application/Controller/Plugin/Xml.php index 37f6ec961..0bad58a2a 100644 --- a/library/Application/Controller/Plugin/Xml.php +++ b/library/Application/Controller/Plugin/Xml.php @@ -9,7 +9,7 @@ class Application_Controller_Plugin_Xml extends Zend_Controller_Plugin_Abstract $action = $this->_request->getActionName(); $view = $layout->getView(); - $page = new Scores_PagePrint($controller, $action); + $page = new Scores_Export_Print($controller, $action) if ($page->exportable('xml') && !empty($view->exportObjet)) { $page->objectToXML($view->exportObjet, $this->_request->getParams()); } diff --git a/library/Scores/PagePrint.php b/library/Scores/Export/Print.php similarity index 99% rename from library/Scores/PagePrint.php rename to library/Scores/Export/Print.php index 630322668..ec7adc189 100644 --- a/library/Scores/PagePrint.php +++ b/library/Scores/Export/Print.php @@ -1,5 +1,5 @@