AbstractHandler::write()
last analyzed

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 1
c 0
b 0
f 0
ccs 0
cts 0
cp 0
nc 1
1
<?php
2
namespace Subreality\Dilmun\Nabu\LoggerHandler;
3
4
/**
5
 * Class AbstractHandler
6
 * @package Subreality\Dilmun\Nabu\LoggerHandler
7
 */
8
abstract class AbstractHandler implements HandlerInterface
9
{
10
    protected $output_allowed = true;
11
12
    /**
13
     * @return bool
14
     */
15
    abstract public function initialize();
16
17
    /**
18
     * @param string $message
19
     * @return bool
20
     */
21
    abstract public function write($message);
22
23
    /**
24
     * @return void
25
     */
26 2
    public function allowOutput()
27
    {
28 2
        $this->output_allowed = true;
29 2
    }
30
31
    /**
32
     * @return void
33
     */
34 4
    public function suppressOutput()
35
    {
36 4
        $this->output_allowed = false;
37 4
    }
38
}
39