本文整理汇总了PHP中Psr7Middlewares\Middleware::payload方法的典型用法代码示例。如果您正苦于以下问题:PHP Middleware::payload方法的具体用法?PHP Middleware::payload怎么用?PHP Middleware::payload使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Psr7Middlewares\Middleware
的用法示例。
在下文中一共展示了Middleware::payload方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<?php
use Psr7Middlewares\Middleware;
return ['globalMiddleware' => [Middleware::responseTime(), Middleware::payload()], 'registeredMiddleware' => ['cache' => 'Craft\\HttpMessages_CacheMiddleware', 'csrf' => 'Craft\\HttpMessages_CsrfMiddleware', 'fractal' => 'Craft\\HttpMessages_FractalMiddleware', 'validation' => 'Craft\\HttpMessages_ValidationMiddleware'], 'headers' => ['html' => ['Content-Type' => ['text/html; charset=utf-8']], 'json' => ['Pragma' => ['no-cache'], 'Cache-Control' => ['no-store', 'no-cache', 'must-revalidate', 'post-check=0', 'pre-check=0'], 'Content-Type' => ['application/json; charset=utf-8']], 'xml' => ['Content-Type' => ['text/xml; charset=utf-8']]]];