function HtaccessWriter::__construct
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/File/HtaccessWriter.php \Drupal\Core\File\HtaccessWriter::__construct()
- 10 core/lib/Drupal/Core/File/HtaccessWriter.php \Drupal\Core\File\HtaccessWriter::__construct()
- 9 core/lib/Drupal/Core/File/HtaccessWriter.php \Drupal\Core\File\HtaccessWriter::__construct()
- 8.9.x core/lib/Drupal/Core/File/HtaccessWriter.php \Drupal\Core\File\HtaccessWriter::__construct()
Htaccess constructor.
Parameters
\Psr\Log\LoggerInterface $logger: The logger.
\Drupal\Core\StreamWrapper\StreamWrapperManagerInterface $streamWrapperManager: The stream wrapper manager.
\Drupal\Core\Site\Settings|null $settings: The settings.
File
-
core/
lib/ Drupal/ Core/ File/ HtaccessWriter.php, line 27
Class
- HtaccessWriter
- Provides functions to manage Apache .htaccess files.
Namespace
Drupal\Core\FileCode
public function __construct(protected LoggerInterface $logger, protected StreamWrapperManagerInterface $streamWrapperManager, protected ?Settings $settings = NULL) {
if (!$settings) {
@trigger_error('Calling ' . __METHOD__ . '() without the $settings argument is deprecated in drupal:11.2.0 and will be required in drupal:12.0.0. See https://www.drupal.org/node/3249817', E_USER_DEPRECATED);
$this->settings = \Drupal::service('settings');
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.