/**
  * Returns the singleton instance for
  * this factory.
  * 
  * @return Smarty $smarty
  */
 public static function getInstance(Smarty $smarty = null, sfContext $context = null)
 {
     if (null === self::$instance) {
         self::$instance = new sfSmartyFactory($smarty, $context);
     }
     return self::$instance;
 }
Example #2
0
 /**
  * @return Smarty $smarty
  */
 public function getEngine()
 {
     return sfSmartyFactory::getInstance(null, $this->context)->getSmarty();
 }