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 / mrclay / minify / lib / Minify / Logger / LegacyHandler.php

LegacyHandler.php in WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance trunk, at vendor/mrclay/minify/lib/Minify/Logger/LegacyHandler.php

25 lines 525 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Minify\Logger;
4
5 use Monolog\Handler\AbstractProcessingHandler;
6
7 class LegacyHandler extends AbstractProcessingHandler
8 {
9 private $obj;
10
11 public function __construct($obj)
12 {
13 if (!is_callable(array($obj, 'log'))) {
14 throw new \InvalidArgumentException('$obj must have a public log() method');
15 }
16 $this->obj = $obj;
17 parent::__construct();
18 }
19
20 protected function write(array $record)
21 {
22 $this->obj->log((string)$record['formatted']);
23 }
24 }
25