Clue\React\Redis\Factory::__construct PHP Method

__construct() public method

public __construct ( React\EventLoop\LoopInterface $loop, React\SocketClient\ConnectorInterface $connector = null, Clue\Redis\Protocol\Factory $protocol = null )
$loop React\EventLoop\LoopInterface
$connector React\SocketClient\ConnectorInterface
$protocol Clue\Redis\Protocol\Factory
    public function __construct(LoopInterface $loop, ConnectorInterface $connector = null, ProtocolFactory $protocol = null)
    {
        if ($connector === null) {
            $resolverFactory = new ResolverFactory();
            $connector = new Connector($loop, $resolverFactory->create('8.8.8.8', $loop));
        }
        if ($protocol === null) {
            $protocol = new ProtocolFactory();
        }
        $this->connector = $connector;
        $this->protocol = $protocol;
    }