function FileProcessOutputCallback::__construct
Same name and namespace in other branches
- 11.x core/modules/package_manager/src/FileProcessOutputCallback.php \Drupal\package_manager\FileProcessOutputCallback::__construct()
File
-
core/
modules/ package_manager/ src/ FileProcessOutputCallback.php, line 27
Class
- FileProcessOutputCallback
- Logs process output to a file.
Namespace
Drupal\package_managerCode
public function __construct(string $path, private readonly ?OutputCallbackInterface $decorated = NULL) {
$this->handle = fopen($path, 'a');
if (empty($this->handle)) {
throw new \RuntimeException("Could not open or create '{$path}' for writing.");
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.