本文整理匯總了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']]]];