Inject RequestVerfier instead of instantiating
This commit is contained in:
		
							parent
							
								
									e75c843fc9
								
							
						
					
					
						commit
						ac4d13cc09
					
				@ -17,8 +17,8 @@ class ServerNegotiator implements NegotiatorInterface {
 | 
			
		||||
 | 
			
		||||
    private $_strictSubProtocols = true;
 | 
			
		||||
 | 
			
		||||
    public function __construct() {
 | 
			
		||||
        $this->verifier = new RequestVerifier;
 | 
			
		||||
    public function __construct(RequestVerifier $requestVerifier) {
 | 
			
		||||
        $this->verifier = $requestVerifier;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
 | 
			
		||||
@ -11,7 +11,7 @@ $socket = new \React\Socket\Server($loop);
 | 
			
		||||
$server = new \React\Http\Server($socket);
 | 
			
		||||
 | 
			
		||||
$closeFrameChecker = new \Ratchet\RFC6455\Messaging\CloseFrameChecker;
 | 
			
		||||
$negotiator = new \Ratchet\RFC6455\Handshake\ServerNegotiator;
 | 
			
		||||
$negotiator = new \Ratchet\RFC6455\Handshake\ServerNegotiator(new \Ratchet\RFC6455\Handshake\RequestVerifier);
 | 
			
		||||
 | 
			
		||||
$uException = new \UnderflowException;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user