src/Reader/Xml.php
protected function recurseToArray($object)
    {
        if (is_scalar($object)) {
            return $object;
        }
        $array = (array)$object;
        foreach ($array as &$value) {
            if (!is_scalar(($value))) {
                $value = $this->recurseToArray($value);
                continue;
            }
        }
        return $array;
    }
protected function recurseToArray($object)
    {
        if (is_scalar($object)) {
            return $object;
        }
        $array = (array)$object;
        foreach ($array as &$value) {
            if (!is_scalar(($value))) {
                $value = $this->recurseToArray($value);
                continue;
            }
        }
        return $array;
    }
protected function recurseToArray ( $ object ) { if ( is_scalar ( $ object ) ) { return $ object ; } $ array = ( array ) $ object ; foreach ( $ array as & $ value ) { if ( ! is_scalar ( ( $ value ) ) ) { $ value = $ this -> recurseToArray ( $ value ) ; continue ; } } return $ array ; }
Recurse through non scalars turning them into arrays, just returns scalars as is.
@param $object
@return mixed
Recurse through non scalars turning them into arrays just returns scalars as is .