Processor
2 weeks ago
WC
2 weeks ago
WP
2 weeks ago
deprecated
2 weeks ago
BasicLoggerFactory.php
2 weeks ago
LoggerFacade.php
2 weeks ago
LoggerFactory.php
2 weeks ago
Settings.php
2 weeks ago
SimpleLoggerFactory.php
2 weeks ago
WPDeskLoggerFactory.php
2 weeks ago
Settings.php
33 lines
| 1 | <?php |
| 2 | |
| 3 | namespace FSVendor\WPDesk\Logger; |
| 4 | |
| 5 | use FSVendor\Psr\Log\LogLevel; |
| 6 | /** |
| 7 | * @deprecated |
| 8 | */ |
| 9 | final class Settings |
| 10 | { |
| 11 | /** @var string */ |
| 12 | public $level = LogLevel::DEBUG; |
| 13 | /** @var bool */ |
| 14 | public $use_wc_log = \true; |
| 15 | /** @var bool */ |
| 16 | public $use_wp_log = \true; |
| 17 | /** |
| 18 | * @param string $level |
| 19 | * @param bool $use_wc_log |
| 20 | * @param bool $use_wp_log |
| 21 | */ |
| 22 | public function __construct(string $level = LogLevel::DEBUG, bool $use_wc_log = \true, bool $use_wp_log = \true) |
| 23 | { |
| 24 | $this->level = $level; |
| 25 | $this->use_wc_log = $use_wc_log; |
| 26 | $this->use_wp_log = $use_wp_log; |
| 27 | } |
| 28 | public function to_array(): array |
| 29 | { |
| 30 | return ['level' => $this->level, 'use_wc_log' => $this->use_wc_log, 'use_wp_log' => $this->use_wp_log]; |
| 31 | } |
| 32 | } |
| 33 |