adding proper constructor
This commit is contained in:
parent
4917567d76
commit
1234be3c63
1 changed files with 11 additions and 3 deletions
14
dBug.php
14
dBug.php
|
@ -65,9 +65,17 @@ class dBug {
|
|||
var $bCollapsed = false;
|
||||
var $arrHistory = array();
|
||||
|
||||
//constructor
|
||||
function dBug($var,$forceType="",$bCollapsed=false) {
|
||||
//include js and css scripts
|
||||
// maintain both styles of constructor for potential backwards compat issues?
|
||||
public function __construct($var,$forceType="",$bCollapsed=false){
|
||||
return $this->init($var,$forceType,$bCollapsed);
|
||||
}
|
||||
|
||||
// TODO: bit the bullet and retire old-skool version
|
||||
public function dBug($var,$forceType="",$bCollapsed=false){
|
||||
return $this->init($var,$forceType,$bCollapsed);
|
||||
}
|
||||
|
||||
private function init($var, $forceType, $bCollapsed) {
|
||||
if(!defined('BDBUGINIT')) {
|
||||
define("BDBUGINIT", TRUE);
|
||||
$this->initJSandCSS();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue