static function get_instance($mail = null) { if (self::$object instanceof self) { return self::$object; } if (is_null($mail)) { $mail = config(null, 'mail'); } self::$object = new self($mail['host'], $mail['port'], $mail['user'], $mail['password'], true); return self::$object; }
static function get_instance($mail = null) { if (self::$object instanceof self) { return self::$object; } is_null($mail) and extract(config(null, 'mail')); self::$object = new self($host, $port, $user, $password, true); return self::$object; }