comparison vendor/symfony/http-kernel/Fragment/FragmentHandler.php @ 14:1fec387a4317

Update Drupal core to 8.5.2 via Composer
author Chris Cannam
date Mon, 23 Apr 2018 09:46:53 +0100
parents 4c8ae668cc8c
children 129ea1e6d783
comparison
equal deleted inserted replaced
13:5fb285c0d0e3 14:1fec387a4317
31 private $debug; 31 private $debug;
32 private $renderers = array(); 32 private $renderers = array();
33 private $requestStack; 33 private $requestStack;
34 34
35 /** 35 /**
36 * Constructor.
37 *
38 * @param RequestStack $requestStack The Request stack that controls the lifecycle of requests 36 * @param RequestStack $requestStack The Request stack that controls the lifecycle of requests
39 * @param FragmentRendererInterface[] $renderers An array of FragmentRendererInterface instances 37 * @param FragmentRendererInterface[] $renderers An array of FragmentRendererInterface instances
40 * @param bool $debug Whether the debug mode is enabled or not 38 * @param bool $debug Whether the debug mode is enabled or not
41 */ 39 */
42 public function __construct(RequestStack $requestStack, array $renderers = array(), $debug = false) 40 public function __construct(RequestStack $requestStack, array $renderers = array(), $debug = false)
48 $this->debug = $debug; 46 $this->debug = $debug;
49 } 47 }
50 48
51 /** 49 /**
52 * Adds a renderer. 50 * Adds a renderer.
53 *
54 * @param FragmentRendererInterface $renderer A FragmentRendererInterface instance
55 */ 51 */
56 public function addRenderer(FragmentRendererInterface $renderer) 52 public function addRenderer(FragmentRendererInterface $renderer)
57 { 53 {
58 $this->renderers[$renderer->getName()] = $renderer; 54 $this->renderers[$renderer->getName()] = $renderer;
59 } 55 }
95 * Delivers the Response as a string. 91 * Delivers the Response as a string.
96 * 92 *
97 * When the Response is a StreamedResponse, the content is streamed immediately 93 * When the Response is a StreamedResponse, the content is streamed immediately
98 * instead of being returned. 94 * instead of being returned.
99 * 95 *
100 * @param Response $response A Response instance
101 *
102 * @return string|null The Response content or null when the Response is streamed 96 * @return string|null The Response content or null when the Response is streamed
103 * 97 *
104 * @throws \RuntimeException when the Response is not successful 98 * @throws \RuntimeException when the Response is not successful
105 */ 99 */
106 protected function deliver(Response $response) 100 protected function deliver(Response $response)