<?php


namespace App\Http\helper;


use phpDocumentor\Reflection\Types\Self_;

class Redis
{
    // 捕鱼控制
    protected $host = '8.129.91.11';
    protected $port = '16973';
    protected $password = '0949jfi959t*fbf0o';

    protected $redis;
    protected static $instance;

    public static function getInstance()
    {
        if (!self::$instance instanceof self) {
            return self::$instance = new self();
        }
        return self::$instance;
    }

    public function redis_content()
    {
        $this->redis = new \Redis();
        $this->redis->connect($this->host, $this->port);
        $this->redis->auth($this->password);
        return $this->redis;
    }

    private function __construct()
    {

    }

    private function __clone()
    {

    }
}
