diff --git a/library/ZendAfi/Controller/Action/Helper/View.php b/library/ZendAfi/Controller/Action/Helper/View.php index 5677d9ecc1f1318f3fe8a2c08d134db48ae247c3..a2fe18dc7d555985696c6e767c3b83a6afaaa60c 100644 --- a/library/ZendAfi/Controller/Action/Helper/View.php +++ b/library/ZendAfi/Controller/Action/Helper/View.php @@ -24,10 +24,21 @@ class ZendAfi_Controller_Action_Helper_View extends Zend_View { use Trait_Translator; + + protected static $instance; private $ouverture_boite; // Html du haut de la boite private $fermeture_boite; // Html du bas de la boite + public static function getInstance() { + return static::$instance; + } + + public function __construct($config = array()) { + parent::__construct($config); + static::$instance = $this; + } + public function init() { parent::init(); diff --git a/library/ZendAfi/View/Helper/BaseHelper.php b/library/ZendAfi/View/Helper/BaseHelper.php index 21f8dd2a669a4595f6bd020c8aaa26c62506c9cd..ef64b1726466f3b6f55916331d4e0c8d70333214 100644 --- a/library/ZendAfi/View/Helper/BaseHelper.php +++ b/library/ZendAfi/View/Helper/BaseHelper.php @@ -25,7 +25,7 @@ class ZendAfi_View_Helper_BaseHelper { protected $view; public function __construct() { - $this->view = new ZendAfi_Controller_Action_Helper_View(); + $this->view = ZendAfi_Controller_Action_Helper_View::getInstance(); $this->init(); }