1: <?php
 2: 
 3: /**
 4:  * This file contains the cDebugDevNull class.
 5:  *
 6:  * @package Core
 7:  * @subpackage Debug
 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 to create an instance of this class.
49:      */
50:     private function __construct() {
51:     }
52: 
53:     /**
54:      * Writes a line.
55:      * This method does nothing!
56:      *
57:      * @see cDebugInterface::out()
58:      * @param string $msg
59:      */
60:     public function out($msg) {
61:     }
62: 
63:     /**
64:      * Outputs contents of passed variable to /dev/null
65:      *
66:      * @param mixed $mVariable
67:      *         The variable to be displayed
68:      * @param string $sVariableDescription [optional]
69:      *         The variable's name or description
70:      * @param bool $bExit [optional]
71:      *         If set to true, your app will NOT die() after output of current var
72:      */
73:     public function show($mVariable, $sVariableDescription = '', $bExit = false) {
74:     }
75: 
76:     /**
77:      * Interface implementation
78:      *
79:      * @param mixed $mVariable
80:      * @param string $sVariableDescription [optional]
81:      */
82:     public function add($mVariable, $sVariableDescription = '') {
83:     }
84: 
85:     /**
86:      * Interface implementation
87:      */
88:     public function reset() {
89:     }
90: 
91:     /**
92:      * Interface implementation
93:      */
94:     public function showAll() {
95:     }
96: }
97: