Skip to content

Instantly share code, notes, and snippets.

@steveoliver
Created January 31, 2013 20:27
Show Gist options
  • Select an option

  • Save steveoliver/4686147 to your computer and use it in GitHub Desktop.

Select an option

Save steveoliver/4686147 to your computer and use it in GitHub Desktop.
Notes on sdboyers comments about partial response handling
// controller arguments
$arguments = $this->resolver->getArguments($request, $controller);
// call controller
// i.e. from menu_execute_active_handler
//
$response = call_user_func_array($controller, $arguments);
// if controller wasn't smart enough to return a complete response...
// controllers should return a partial response with content -- basically a
// string that page.tpl would produce in D7, plus add'l meta including assets and meta tags, etc.
// don't use the full symfony response because we wanna do this extra processing.
// there is a subscriber which is called from
// view
if (!$response instanceof Response) {
@steveoliver

Copy link
Copy Markdown
Author

from Symfony HttpKernel.php

@steveoliver

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment