1: <?php
2: /**
3: * This file contains the cDebugDevNull class.
4: *
5: * @package Core
6: * @subpackage Debug
7: * @version SVN Revision $Rev:$
8: *
9: * @author Rudi Bieller
10: * @copyright four for business AG <www.4fb.de>
11: * @license http://www.contenido.org/license/LIZENZ.txt
12: * @link http://www.4fb.de
13: * @link http://www.contenido.org
14: */
15:
16: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
17:
18: /**
19: * Debug object to not output info at all.
20: * Note: Be careful when using $bExit = true as this will NOT cause a die() in
21: * this object!
22: *
23: * @package Core
24: * @subpackage Debug
25: */
26: class cDebugDevNull implements cDebugInterface {
27:
28: /**
29: * Singleton instance
30: *
31: * @var cDebugDevNull
32: */
33: private static $_instance;
34:
35: /**
36: * Return singleton instance.
37: *
38: * @return cDebugDevNull
39: */
40: public static function getInstance() {
41: if (self::$_instance == NULL) {
42: self::$_instance = new cDebugDevNull();
43: }
44: return self::$_instance;
45: }
46:
47: /**
48: * Constructor
49: */
50: private function __construct() {
51: }
52:
53: /**
54: * (non-PHPdoc)
55: *
56: * @see cDebugInterface::out()
57: */
58: public function out($msg) {
59: }
60:
61: /**
62: * Outputs contents of passed variable to /dev/null
63: *
64: * @param mixed $mVariable The variable to be displayed
65: * @param string $sVariableDescription The variable's name or description
66: * @param boolean $bExit If set to true, your app will NOT die() after
67: * output of current var
68: */
69: public function show($mVariable, $sVariableDescription = '', $bExit = false) {
70: }
71:
72: /**
73: * Interface implementation
74: *
75: * @param mixed $mVariable
76: * @param string $sVariableDescription
77: */
78: public function add($mVariable, $sVariableDescription = '') {
79: }
80:
81: /**
82: * Interface implementation
83: */
84: public function reset() {
85: }
86:
87: /**
88: * Interface implementation
89: */
90: public function showAll() {
91: }
92: }