Cml\dBug::__construct PHP Метод

__construct() публичный Метод

构造方法
public __construct ( mixed $var, string $forceType = "", boolean $bCollapsed = false )
$var mixed 要打印的变量
$forceType string
$bCollapsed boolean
    public function __construct($var, $forceType = "", $bCollapsed = false)
    {
        //include js and css scripts
        $this->initJSandCSS();
        $arrAccept = ["array", "object", "xml"];
        //array of variable types that can be "forced"
        $this->bCollapsed = $bCollapsed;
        if (in_array($forceType, $arrAccept)) {
            $this->{"varIs" . ucfirst($forceType)}($var);
        } else {
            $this->checkType($var);
        }
    }