‪TYPO3CMS  10.4
AbstractWriter.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
20 
24 abstract class ‪AbstractWriter implements ‪WriterInterface
25 {
27 
34  public function ‪__construct(array $options = [])
35  {
36  foreach ($options as $optionKey => $optionValue) {
37  $methodName = 'set' . ucfirst($optionKey);
38  if (method_exists($this, $methodName)) {
39  $this->{$methodName}($optionValue);
40  } else {
41  throw new ‪InvalidLogWriterConfigurationException('Invalid LogWriter configuration option "' . $optionKey . '" for log writer of type "' . static::class . '"', 1321696152);
42  }
43  }
44  }
45 }
‪TYPO3\CMS\Core\Log\Exception\InvalidLogWriterConfigurationException
Definition: InvalidLogWriterConfigurationException.php:24
‪TYPO3\CMS\Core\Security\BlockSerializationTrait
Definition: BlockSerializationTrait.php:28
‪TYPO3\CMS\Core\Log\Writer\AbstractWriter\__construct
‪__construct(array $options=[])
Definition: AbstractWriter.php:34
‪TYPO3\CMS\Core\Log\Writer\WriterInterface
Definition: WriterInterface.php:24
‪TYPO3\CMS\Core\Log\Writer
Definition: AbstractWriter.php:16
‪TYPO3\CMS\Core\Log\Writer\AbstractWriter
Definition: AbstractWriter.php:25