public function matches($expr)
    {
        $params = self::parseEventExpr($expr);

        if ($params['topic'] === '*') {
            return true;
        } elseif ($this->topic !== $params['topic']) {
            return false;
        }

        if ($params['event'] === '*') {
            return true;
        } elseif ($this->name !== $params['event']) {
            return false;
        }

        if ($params['version'] === '*') {
            return true;
        } else {
            return Semver::satisfies($this->version, $params['version']);
        }
    }
public function matches($expr)
    {
        $params = self::parseEventExpr($expr);

        if ($params['topic'] === '*') {
            return true;
        } elseif ($this->topic !== $params['topic']) {
            return false;
        }

        if ($params['event'] === '*') {
            return true;
        } elseif ($this->name !== $params['event']) {
            return false;
        }

        if ($params['version'] === '*') {
            return true;
        } else {
            return Semver::satisfies($this->version, $params['version']);
        }
    }
public function matches ( $ expr ) { $ params = self :: parseEventExpr ( $ expr ) ; if ( $ params [ 'topic' ] === '*' ) { return true ; } elseif ( $ this -> topic !== $ params [ 'topic' ] ) { return false ; } if ( $ params [ 'event' ] === '*' ) { return true ; } elseif ( $ this -> name !== $ params [ 'event' ] ) { return false ; } if ( $ params [ 'version' ] === '*' ) { return true ; } else { return Semver :: satisfies ( $ this -> version , $ params [ 'version' ] ) ; } }
Check whether or not the event matches the given expression.

@param string $expr

@return bool
Check whether or not the event matches the given expression .