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