Skip to content
Snippets Groups Projects
Commit c9900cc0 authored by llaffont's avatar llaffont
Browse files

Améliorations perfs: n'utilise qu'une seule instance de ZendAfi_...View par helper

parent b6d082be
No related merge requests found
......@@ -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();
......
......@@ -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();
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment