1: <?php
2:
3: namespace PHPixie\Framework\Extensions\Template\Extension;
4:
5: /**
6: * Template extension that allows
7: * access to the Debug component
8: */
9: class Debug implements \PHPixie\Template\Extensions\Extension
10: {
11: /**
12: * @var \PHPixie\Debug
13: */
14: protected $debug;
15:
16: /**
17: * Constructor
18: * @param \PHPixie\Debug $debug
19: */
20: public function __construct($debug)
21: {
22: $this->debug = $debug;
23: }
24:
25: /**
26: * @inheritdoc
27: */
28: public function name()
29: {
30: return 'debug';
31: }
32:
33: /**
34: * @inheritdoc
35: */
36: public function methods()
37: {
38: return array(
39: 'debugLogger' => 'logger'
40: );
41: }
42:
43: /**
44: * @inheritdoc
45: */
46: public function aliases()
47: {
48: return array();
49: }
50:
51: /**
52: * Debug component logger
53: * @return \PHPixie\Debug\Logger
54: */
55: public function logger()
56: {
57: return $this->debug->logger();
58: }
59: }