Ejemplo n.º 1
0
 /**
  * Returns an singleton instance of this class
  * @return
  */
 public static function getInstance()
 {
     if (self::$instance == null) {
         self::$instance = new Cookie();
     }
     return self::$instance;
 }
Ejemplo n.º 2
0
 public static function newInstance()
 {
     if (!self::$instance instanceof self) {
         self::$instance = new self();
     }
     return self::$instance;
 }
Ejemplo n.º 3
0
 public static function init()
 {
     if (empty(self::$instance)) {
         self::$instance = new self();
     }
     return self::$instance;
 }
Ejemplo n.º 4
0
 public static function getInstance()
 {
     if (!isset(self::$instance)) {
         $c = __CLASS__;
         self::$instance = new $c();
     }
     return self::$instance;
 }
Ejemplo n.º 5
0
 /**
  * @param $name
  * @return bool
  */
 public static function exists($name)
 {
     return \Cookie::instance()->_exists($name);
 }