diff --git a/core/modules/aggregator/tests/modules/aggregator_test/lib/Drupal/aggregator_test/Controller/AggregatorTestRssController.php b/core/modules/aggregator/tests/modules/aggregator_test/lib/Drupal/aggregator_test/Controller/AggregatorTestRssController.php index 3fb8c40..6c2b1cd 100644 --- a/core/modules/aggregator/tests/modules/aggregator_test/lib/Drupal/aggregator_test/Controller/AggregatorTestRssController.php +++ b/core/modules/aggregator/tests/modules/aggregator_test/lib/Drupal/aggregator_test/Controller/AggregatorTestRssController.php @@ -11,6 +11,9 @@ use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Request; +/** + * Controller for the aggregator_test module. + */ class AggregatorTestRssController extends ControllerBase { /** @@ -20,6 +23,11 @@ class AggregatorTestRssController extends ControllerBase { * Set TRUE to send a last modified header. * @param $use_etag * Set TRUE to send an etag. + * @param Request $request + * Information about the current HTTP request. + * + * @return \Symfony\Component\HttpFoundation\Response + * A feed that forces cache validation. */ public function testFeed($use_last_modified, $use_etag, Request $request) { $response = new Response(); @@ -44,7 +52,7 @@ public function testFeed($use_last_modified, $use_etag, Request $request) { return $response; } - // The following headers force validation of cache: + // The following headers force validation of cache. $response->headers->set('Expires', 'Sun, 19 Nov 1978 05:00:00 GMT'); $response->headers->set('Cache-Control', 'must-revalidate'); $response->headers->set('Content-Type', 'application/rss+xml; charset=utf-8'); @@ -59,6 +67,12 @@ public function testFeed($use_last_modified, $use_etag, Request $request) { return $response; } + /** + * Generates a rest redirect to the test feed. + * + * @return \Symfony\Component\HttpFoundation\RedirectResponse + * A response that redirects users to the test feed. + */ public function testRedirect() { return $this->redirect('aggregator_test_feed', array(), 301); }