scratch – Blame information for rev 120

Subversion Repositories:
Rev:
Rev Author Line No. Line
120 office 1 <?php
2  
3 /*
4 * This file is part of the Monolog package.
5 *
6 * (c) Jordi Boggiano <j.boggiano@seld.be>
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 use Monolog\Formatter\FormatterInterface;
15  
16 /**
17 * Interface that all Monolog Handlers must implement
18 *
19 * @author Jordi Boggiano <j.boggiano@seld.be>
20 */
21 interface HandlerInterface
22 {
23 /**
24 * Checks whether the given record will be handled by this handler.
25 *
26 * This is mostly done for performance reasons, to avoid calling processors for nothing.
27 *
28 * Handlers should still check the record levels within handle(), returning false in isHandling()
29 * is no guarantee that handle() will not be called, and isHandling() might not be called
30 * for a given record.
31 *
32 * @param array $record Partial log record containing only a level key
33 *
34 * @return Boolean
35 */
36 public function isHandling(array $record);
37  
38 /**
39 * Handles a record.
40 *
41 * All records may be passed to this method, and the handler should discard
42 * those that it does not want to handle.
43 *
44 * The return value of this function controls the bubbling process of the handler stack.
45 * Unless the bubbling is interrupted (by returning true), the Logger class will keep on
46 * calling further handlers in the stack with a given log record.
47 *
48 * @param array $record The record to handle
49 * @return Boolean true means that this handler handled the record, and that bubbling is not permitted.
50 * false means the record was either not processed or that this handler allows bubbling.
51 */
52 public function handle(array $record);
53  
54 /**
55 * Handles a set of records at once.
56 *
57 * @param array $records The records to handle (an array of record arrays)
58 */
59 public function handleBatch(array $records);
60  
61 /**
62 * Adds a processor in the stack.
63 *
64 * @param callable $callback
65 * @return self
66 */
67 public function pushProcessor($callback);
68  
69 /**
70 * Removes the processor on top of the stack and returns it.
71 *
72 * @return callable
73 */
74 public function popProcessor();
75  
76 /**
77 * Sets the formatter.
78 *
79 * @param FormatterInterface $formatter
80 * @return self
81 */
82 public function setFormatter(FormatterInterface $formatter);
83  
84 /**
85 * Gets the formatter.
86 *
87 * @return FormatterInterface
88 */
89 public function getFormatter();
90 }