public function create(ServerRequestInterface $request) : CallbackInterface
    {
        $callbacks = [
            XmlCallback::class,
            FormCallback::class,
            RedirectCallback::class
        ];

        foreach ($callbacks as $callback) {
            if (call_user_func([$callback, 'initable'], $request)) {
                return new $callback($request);
            }
        }

        throw new \InvalidArgumentException('A callback could not be instantiated');
    }
public function create(ServerRequestInterface $request) : CallbackInterface
    {
        $callbacks = [
            XmlCallback::class,
            FormCallback::class,
            RedirectCallback::class
        ];

        foreach ($callbacks as $callback) {
            if (call_user_func([$callback, 'initable'], $request)) {
                return new $callback($request);
            }
        }

        throw new \InvalidArgumentException('A callback could not be instantiated');
    }
public function create ( ServerRequestInterface $ request ) : CallbackInterface { $ callbacks = [ XmlCallback :: class , FormCallback :: class , RedirectCallback :: class ] ; foreach ( $ callbacks as $ callback ) { if ( call_user_func ( [ $ callback , 'initable' ] , $ request ) ) { return new $ callback ( $ request ) ; } } throw new \ InvalidArgumentException ( 'A callback could not be instantiated' ) ; }
Will take a Psr Server Request and return a Form, Xml or Redirect
callback object that represent the actual callback

@param ServerRequestInterface $request
@throws \InvalidArgumentException
@return CallbackInterface
Will take a Psr Server Request and return a Form Xml or Redirect callback object that represent the actual callback