私はZendの表情豊かなネストされたアプリケーションを使用しようとしているので、私はこのブログの記事次のようだ: https://framework.zend.com/blog/2017-03-15-nested-middleware-in-expressive.htmlZendの表現のネストされたアプリケーション
問題はミドルウェアの工場内にあるように見えます:
class CreateBookMiddlewareFactory
{
public function __invoke(ContainerInterface $container)
{
$nested = new Application(
$container->get(RouterInterface::class),
$container
);
$nested->pipe(AuthenticationMiddleware::class);
$nested->pipe(ContentValidationMiddleware::class);
$nested->pipe(BodyParamsMiddleware::class);
$nested->pipe(BookValidationMiddleware::class);
$nested->pipe(CreateBookMiddleware::class);
return $nested;
}
}
私たちは工場にいるので、CreateBookMiddleware
をここにパイプに追加することはできません。 ...それは別のネストされたアプリケーションを作成するファクトリを呼び出します新しいネストされたアプリケーションを作成し、工場を呼び出しますパイピングので
(!) Fatal error: Maximum function nesting level of '256' reached, aborting! in /var/www/project/vendor/zendframework/zend-stratigility/src/Next.php on line
158
は、私は、このブログの記事から右の届かないものがありますか?
:https://github.com/zendframework/zf3-web/commit/2ae14d151e512b13506c4f854ad6a811d9a74af0 – xtreamwayz