public static function run() { if (self::$instance) { self::crash("Singletons only, please"); } self::$instance = new self(); }
public static function daemonize($pidfile = false) { if (self::$instance) { echo "Singletons only, please\n"; exit(0); } if (PHP_SAPI !== 'cli') { die; } self::$instance = new self($pidfile); }