PHPDaemon\DNode\DNode::toJsonDebugResursive PHP Method

toJsonDebugResursive() public static method

Recursion handler for toJsonDebug()
public static toJsonDebugResursive ( &$m ) : void
return void
    public static function toJsonDebugResursive(&$m)
    {
        if ($m instanceof \Closure) {
            $m = '__CALLBACK__';
        } elseif (is_array($m)) {
            if (sizeof($m) === 2 && isset($m[0]) && $m[0] instanceof \PHPDaemon\WebSocket\Route) {
                if (isset($m[1]) && is_string($m[1]) && strncmp($m[1], 'remote_', 7) === 0) {
                    $m = '__CALLBACK__';
                }
            } else {
                foreach ($m as &$v) {
                    static::toJsonDebugResursive($v);
                }
            }
        } elseif (is_object($m)) {
            foreach ($m as &$v) {
                static::toJsonDebugResursive($v);
            }
        }
    }