TrustedHostsTestController.php in Zircon Profile 8
Same filename and directory in other branches
Namespace
Drupal\trusted_hosts_test\ControllerFile
core/modules/system/tests/modules/trusted_hosts_test/src/Controller/TrustedHostsTestController.phpView source
<?php
/**
* @file
* Contains \Drupal\trusted_hosts_test\Controller\TrustedHostsTestController.
*/
namespace Drupal\trusted_hosts_test\Controller;
use Symfony\Component\HttpFoundation\Request;
/**
* Provides a test controller for testing the trusted hosts setting.
*/
class TrustedHostsTestController {
/**
* Creates a fake request and prints out its host.
*/
public function fakeRequestHost() {
$request = Request::create('/');
return [
'#markup' => 'Host: ' . $request
->getHost(),
];
}
}
Classes
Name | Description |
---|---|
TrustedHostsTestController | Provides a test controller for testing the trusted hosts setting. |