public function auth($password)
    {
        if ($this->getConfig()->get('requirepass') === '') {
            throw new UnexpectedValueException('ERR Client sent AUTH, but no password is set');
        }

        if ($this->getConfig()->get('requirepass') !== $password) {
            throw new UnexpectedValueException('ERR invalid password');
        }

        $business = $this->getClient()->getBusiness();
        if ($business instanceof AuthInvoker) {
            $this->getClient()->setBusiness($business->getSuccessfulInvoker());
        }

        return true;
    }
public function auth($password)
    {
        if ($this->getConfig()->get('requirepass') === '') {
            throw new UnexpectedValueException('ERR Client sent AUTH, but no password is set');
        }

        if ($this->getConfig()->get('requirepass') !== $password) {
            throw new UnexpectedValueException('ERR invalid password');
        }

        $business = $this->getClient()->getBusiness();
        if ($business instanceof AuthInvoker) {
            $this->getClient()->setBusiness($business->getSuccessfulInvoker());
        }

        return true;
    }
public function auth ( $ password ) { if ( $ this -> getConfig ( ) -> get ( 'requirepass' ) === '' ) { throw new UnexpectedValueException ( 'ERR Client sent AUTH, but no password is set' ) ; } if ( $ this -> getConfig ( ) -> get ( 'requirepass' ) !== $ password ) { throw new UnexpectedValueException ( 'ERR invalid password' ) ; } $ business = $ this -> getClient ( ) -> getBusiness ( ) ; if ( $ business instanceof AuthInvoker ) { $ this -> getClient ( ) -> setBusiness ( $ business -> getSuccessfulInvoker ( ) ) ; } return true ; }
StatusReply
StatusReply