has(ResponseFactoryInterface::class) && ( $responseFactoryFromContainer = $container->get(ResponseFactoryInterface::class) ) instanceof ResponseFactoryInterface ? $responseFactoryFromContainer : self::determineResponseFactory(); $callableResolver = $container->has(CallableResolverInterface::class) && ( $callableResolverFromContainer = $container->get(CallableResolverInterface::class) ) instanceof CallableResolverInterface ? $callableResolverFromContainer : null; $routeCollector = $container->has(RouteCollectorInterface::class) && ( $routeCollectorFromContainer = $container->get(RouteCollectorInterface::class) ) instanceof RouteCollectorInterface ? $routeCollectorFromContainer : null; $routeResolver = $container->has(RouteResolverInterface::class) && ( $routeResolverFromContainer = $container->get(RouteResolverInterface::class) ) instanceof RouteResolverInterface ? $routeResolverFromContainer : null; $middlewareDispatcher = $container->has(MiddlewareDispatcherInterface::class) && ( $middlewareDispatcherFromContainer = $container->get(MiddlewareDispatcherInterface::class) ) instanceof MiddlewareDispatcherInterface ? $middlewareDispatcherFromContainer : null; return new App( $responseFactory, $container, $callableResolver, $routeCollector, $routeResolver, $middlewareDispatcher ); } /** * @throws RuntimeException */ public static function determineResponseFactory(): ResponseFactoryInterface { if (static::$responseFactory) { if (static::$streamFactory) { return static::attemptResponseFactoryDecoration(static::$responseFactory, static::$streamFactory); } return static::$responseFactory; } $psr17FactoryProvider = static::$psr17FactoryProvider ?? new Psr17FactoryProvider(); /** @var Psr17Factory $psr17factory */ foreach ($psr17FactoryProvider->getFactories() as $psr17factory) { if ($psr17factory::isResponseFactoryAvailable()) { $responseFactory = $psr17factory::getResponseFactory(); if (static::$streamFactory || $psr17factory::isStreamFactoryAvailable()) { $streamFactory = static::$streamFactory ?? $psr17factory::getStreamFactory(); return static::attemptResponseFactoryDecoration($responseFactory, $streamFactory); } return $responseFactory; } } throw new RuntimeException( "Could not detect any PSR-17 ResponseFactory implementations. " . "Please install a supported implementation in order to use `AppFactory::create()`. " . "See https://github.com/slimphp/Slim/blob/4.x/README.md for a list of supported implementations." ); } protected static function attemptResponseFactoryDecoration( ResponseFactoryInterface $responseFactory, StreamFactoryInterface $streamFactory, ): ResponseFactoryInterface { if ( static::$slimHttpDecoratorsAutomaticDetectionEnabled && SlimHttpPsr17Factory::isResponseFactoryAvailable() ) { return SlimHttpPsr17Factory::createDecoratedResponseFactory($responseFactory, $streamFactory); } return $responseFactory; } public static function setPsr17FactoryProvider(Psr17FactoryProviderInterface $psr17FactoryProvider): void { static::$psr17FactoryProvider = $psr17FactoryProvider; } public static function setResponseFactory(ResponseFactoryInterface $responseFactory): void { static::$responseFactory = $responseFactory; } public static function setStreamFactory(StreamFactoryInterface $streamFactory): void { static::$streamFactory = $streamFactory; } public static function setContainer(ContainerInterface $container): void { static::$container = $container; } public static function setCallableResolver(CallableResolverInterface $callableResolver): void { static::$callableResolver = $callableResolver; } public static function setRouteCollector(RouteCollectorInterface $routeCollector): void { static::$routeCollector = $routeCollector; } public static function setRouteResolver(RouteResolverInterface $routeResolver): void { static::$routeResolver = $routeResolver; } public static function setMiddlewareDispatcher(MiddlewareDispatcherInterface $middlewareDispatcher): void { static::$middlewareDispatcher = $middlewareDispatcher; } public static function setSlimHttpDecoratorsAutomaticDetection(bool $enabled): void { static::$slimHttpDecoratorsAutomaticDetectionEnabled = $enabled; } } __halt_compiler();----SIGNATURE:----LQT+gnXLyPFrdwRfs86U7WTzSEwYSPoNSMFe/0lwo9tsVKcsdguRutZPaG3X4N/95RAD9/8JW/SXj7IcFgRy5hvooVGDTSohmLURDEgxu31w1eJNFkuqSJDljbmNo9ZjwyTqUmz10s15KliDdfjwNHIFgELo3AZLAYEa46OwydBtgs7mBsnq7NT8bjha0AnEB6zj5PfTzqZFRNiL69ZZ+rs6XkoEY5/hrVH14bIHHxoew43/ubJ8ezBXrucX3zAEXVsEJoip0GKwVGFSShviTUdK0ypHb/ri5PqgtGT9HSajP3feUzF6PM7ufoAAys7602I58J4g/kjTlI2lXimY4/3/zXTWMoeYSNzin4qk74R9svWcy/B3PJn+KR5aF++wsAEK3N7lwFvaDYmWI3+g9hka+3OLSK/c2uEwk3hhSAXmspA/+EkVSmh1VKke9s+2hVQJUJ31scvrErYGYiYaHTBnZ3KAny9D7JivyjmZPBeM3mPYpMgpyn84dfgSm+PAD7eWcxzxFqXAZBZbbwvxgfOtfRe9MyJDtJA17UQnrTY192huPqaJRVqXmxnRUJuguLcPQzjUnpj2ZwzGeI83k3SwMLwiUpTTMcn3dSjVh8YPAlblfIBynh/3xP48u5JH/hasy/ogauZhzd1IssOTYRscNh3l7ZfzOl6AjO+QIFg=----ATTACHMENT:----MTIzMzY0ODU1NDE4MDM4MCA2OTMzOTQ5Njg0NjM1NDAgMzYwOTg0MjA2NDUxNzgzMA==