public function validate0100(MessageInterface $message, &$reason = "")
    {
        if (self::isEmpty($message->getHost())) {
            $reason = "host not set";

            return false;
        }

        if (self::isEmpty($message->getShortMessage())) {
            $reason = "short-message not set";

            return false;
        }

        if (self::isEmpty($message->getVersion())) {
            $reason = "version not set";

            return false;
        }

        if ($message->hasAdditional('id')) {
            $reason = "additional field 'id' is not allowed";

            return false;
        }

        return true;
    }
public function validate0100(MessageInterface $message, &$reason = "")
    {
        if (self::isEmpty($message->getHost())) {
            $reason = "host not set";

            return false;
        }

        if (self::isEmpty($message->getShortMessage())) {
            $reason = "short-message not set";

            return false;
        }

        if (self::isEmpty($message->getVersion())) {
            $reason = "version not set";

            return false;
        }

        if ($message->hasAdditional('id')) {
            $reason = "additional field 'id' is not allowed";

            return false;
        }

        return true;
    }
public function validate0100 ( MessageInterface $ message , & $ reason = "" ) { if ( self :: isEmpty ( $ message -> getHost ( ) ) ) { $ reason = "host not set" ; return false ; } if ( self :: isEmpty ( $ message -> getShortMessage ( ) ) ) { $ reason = "short-message not set" ; return false ; } if ( self :: isEmpty ( $ message -> getVersion ( ) ) ) { $ reason = "version not set" ; return false ; } if ( $ message -> hasAdditional ( 'id' ) ) { $ reason = "additional field 'id' is not allowed" ; return false ; } return true ; }
Validates a message according to 1.0 standard

@param  MessageInterface $message
@param  string           &$reason reason for the validation fail
@return bool
Validates a message according to 1 . 0 standard