コード例 #1
0
ファイル: View.php プロジェクト: sandeepdwarkapuria/dotkernel
 /**
  * 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;
 }
コード例 #2
0
ファイル: view.php プロジェクト: esironal/exidoengine
 /**
  * Gets the singleton instance
  * @return Input
  */
 public static function &instance()
 {
     if (self::$_instance === null) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
コード例 #3
0
ファイル: view.php プロジェクト: Antoshka007/php_dz5
 public static function getInstance()
 {
     if (!self::$_instance) {
         self::$_instance = new self();
     }
     return self::$_templater;
 }
コード例 #4
0
ファイル: View.class.php プロジェクト: hexcode007/yfcms
 public static function instance($config)
 {
     if (!is_object(self::$_instance)) {
         self::$_instance = new self($config);
     }
     return self::$_instance;
 }
コード例 #5
0
ファイル: View.php プロジェクト: sandeepdwarkapuria/dotkernel
 /**
  * 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;
 }
コード例 #6
0
ファイル: View.php プロジェクト: kennyhonghui/zhuoxi
 /**
  * 单件模式调用方法
  */
 public static function getInstance()
 {
     if (!self::$_instance instanceof self) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }