public static function getInstance($class = null)
    {
        static $instance = [];
        if (!empty($class)) {
            if (!$instance || strtolower($class) !== strtolower(get_class($instance[0]))) {
                $instance[0] = new $class();
            }
        }
        if (!$instance) {
            $instance[0] = new Debugger();
        }

        return $instance[0];
    }
public static function getInstance($class = null)
    {
        static $instance = [];
        if (!empty($class)) {
            if (!$instance || strtolower($class) !== strtolower(get_class($instance[0]))) {
                $instance[0] = new $class();
            }
        }
        if (!$instance) {
            $instance[0] = new Debugger();
        }

        return $instance[0];
    }
public static function getInstance ( $ class = null ) { static $ instance = [ ] ; if ( ! empty ( $ class ) ) { if ( ! $ instance || strtolower ( $ class ) !== strtolower ( get_class ( $ instance [ 0 ] ) ) ) { $ instance [ 0 ] = new $ class ( ) ; } } if ( ! $ instance ) { $ instance [ 0 ] = new Debugger ( ) ; } return $ instance [ 0 ] ; }
Returns a reference to the Debugger singleton object instance.

@param string|null $class Class name.
@return \Cake\Error\Debugger
Returns a reference to the Debugger singleton object instance .