/** * Add to contructor instance of context */ public function __construct() { parent::__construct(); if ($this->getPSV() < 1.5) { $this->context = PrestoChangeoContext::getContext(); $this->smarty = $this->context->smarty; } }
/** * Get a singleton context * * @return Context */ public static function getContext() { if (!isset(self::$instance)) { self::$instance = new PrestoChangeoContext(); } return self::$instance; }