PluginProbe
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance / trunk
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance vtrunk
4.7.0 4.6.1 4.6.0 4.5.5 4.5.4 4.5.3 4.5.2 3.2.20 3.2.21 3.2.22 3.2.3 3.2.5 3.2.6 3.2.7 3.2.9 3.3.0 3.3.1 3.3.2 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 3.7.0 3.7.1 All 111 releases
wp-optimize / vendor / monolog / monolog / src / Monolog / Handler / Handler.php

Handler.php in WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance trunk, at vendor/monolog/monolog/src/Monolog/Handler/Handler.php

54 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php declare(strict_types=1);
2
3 /*
4 * This file is part of the Monolog package.
5 *
6 * (c) Jordi Boggiano <[email protected]>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12 namespace Monolog\Handler;
13
14 /**
15 * Base Handler class providing basic close() support as well as handleBatch
16 *
17 * @author Jordi Boggiano <[email protected]>
18 */
19 abstract class Handler implements HandlerInterface
20 {
21 /**
22 * {@inheritDoc}
23 */
24 public function handleBatch(array $records): void
25 {
26 foreach ($records as $record) {
27 $this->handle($record);
28 }
29 }
30
31 /**
32 * {@inheritDoc}
33 */
34 public function close(): void
35 {
36 }
37
38 public function __destruct()
39 {
40 try {
41 $this->close();
42 } catch (\Throwable $e) {
43 // do nothing
44 }
45 }
46
47 public function __sleep()
48 {
49 $this->close();
50
51 return array_keys(get_object_vars($this));
52 }
53 }
54