Verzeichnisstruktur phpBB-3.2.0
- Veröffentlicht
- 06.01.2017
So funktioniert es
|
Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück |
Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
Logger.php
01 <?php
02
03 /*
04 * @package s9e\TextFormatter
05 * @copyright Copyright (c) 2010-2016 The s9e Authors
06 * @license http://www.opensource.org/licenses/mit-license.php The MIT License
07 */
08 namespace s9e\TextFormatter\Parser;
09 use InvalidArgumentException;
10 use s9e\TextFormatter\Parser;
11 class Logger
12 {
13 protected $attrName;
14 protected $logs = array();
15 protected $tag;
16 protected function add($type, $msg, array $context)
17 {
18 if (!isset($context['attrName']) && isset($this->attrName))
19 $context['attrName'] = $this->attrName;
20 if (!isset($context['tag']) && isset($this->tag))
21 $context['tag'] = $this->tag;
22 $this->logs[] = array($type, $msg, $context);
23 }
24 public function clear()
25 {
26 $this->logs = array();
27 $this->unsetAttribute();
28 $this->unsetTag();
29 }
30 public function get()
31 {
32 return $this->logs;
33 }
34 public function setAttribute($attrName)
35 {
36 $this->attrName = $attrName;
37 }
38 public function setTag(Tag $tag)
39 {
40 $this->tag = $tag;
41 }
42 public function unsetAttribute()
43 {
44 unset($this->attrName);
45 }
46 public function unsetTag()
47 {
48 unset($this->tag);
49 }
50 public function debug($msg, array $context = array())
51 {
52 $this->add('debug', $msg, $context);
53 }
54 public function err($msg, array $context = array())
55 {
56 $this->add('err', $msg, $context);
57 }
58 public function info($msg, array $context = array())
59 {
60 $this->add('info', $msg, $context);
61 }
62 public function warn($msg, array $context = array())
63 {
64 $this->add('warn', $msg, $context);
65 }
66 }