src/PbjxHelperTrait.php
protected function createResponseFromRequest(Request $request, Pbjx $pbjx): Response
    {
        $curie = str_replace('-request', '-response', $request::schema()->getCurie()->toString());
        /** @var Response $class */
        $class = MessageResolver::resolveCurie(SchemaCurie::fromString($curie));
        return $class::create();
    }
protected function createResponseFromRequest(Request $request, Pbjx $pbjx): Response
    {
        $curie = str_replace('-request', '-response', $request::schema()->getCurie()->toString());
        /** @var Response $class */
        $class = MessageResolver::resolveCurie(SchemaCurie::fromString($curie));
        return $class::create();
    }
protected function createResponseFromRequest ( Request $ request , Pbjx $ pbjx ) : Response { $ curie = str_replace ( '-request' , '-response' , $ request :: schema ( ) -> getCurie ( ) -> toString ( ) ) ; /** @var Response $class */ $ class = MessageResolver :: resolveCurie ( SchemaCurie :: fromString ( $ curie ) ) ; return $ class :: create ( ) ; }
Conventionally the response messages are named the same as the request but
with a "-response" suffix.  Override when needed.

@param Request $request
@param Pbjx    $pbjx

@return Response
Conventionally the response messages are named the same as the request but with a - response suffix . Override when needed .