Ejemplo n.º 1
0
 /**
  * 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;
     }
 }
Ejemplo n.º 2
0
 /**
  * Get a singleton context
  *
  * @return Context
  */
 public static function getContext()
 {
     if (!isset(self::$instance)) {
         self::$instance = new PrestoChangeoContext();
     }
     return self::$instance;
 }