Example #1
0
 /**
  * Returns an instance of Dot_View
  * Singleton pattern implementation
  * @access public
  * @param string $root     Template root directory
  * @param string $unknowns How to handle unknown variables
  * @param array  $fallback Fallback paths
  * @return Dot_Template
  */
 public static function getInstance($root = '.', $unknowns = 'remove', $fallback = '')
 {
     if (null === self::$_instance) {
         self::$_instance = new self($root, $unknowns, $fallback);
     }
     return self::$_instance;
 }
Example #2
0
 /**
  * Gets the singleton instance
  * @return Input
  */
 public static function &instance()
 {
     if (self::$_instance === null) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
Example #3
0
 public static function getInstance()
 {
     if (!self::$_instance) {
         self::$_instance = new self();
     }
     return self::$_templater;
 }
Example #4
0
 public static function instance($config)
 {
     if (!is_object(self::$_instance)) {
         self::$_instance = new self($config);
     }
     return self::$_instance;
 }
Example #5
0
 /**
  * Returns an instance of Dot_View
  * Singleton pattern implementation
  * @access public
  * @static
  * @param string $root     Template root directory
  * @param string $unknowns How to handle unknown variables
  * @param array  $fallback Fallback paths
  * @return Dot_Template
  */
 public static function getInstance($root = '.', $unknowns = 'remove', $fallback = '')
 {
     if (null === self::$_instance) {
         self::$_instance = new self($root, $unknowns, $fallback);
         self::$_instance->settings = Zend_Registry::get('settings');
     }
     return self::$_instance;
 }
Example #6
0
 /**
  * 单件模式调用方法
  */
 public static function getInstance()
 {
     if (!self::$_instance instanceof self) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }