protected function convertIDs($data) {
        $arr = array();
        
        foreach($data as $key => $val) {
            if(\is_string($key) && $key[0] === ':') {
                $key = \mb_substr($key, 1);
            }
            
            if($val instanceof \CharlotteDunois\Kimberly\Atom) {
                $arr[$key] = (string) $val->atom;
            } elseif($val instanceof \CharlotteDunois\Kimberly\BaseObject) {
                $arr[$key] = $val->toArray();
            } elseif(\is_array($val) || \is_object($val)) {
                $arr[$key] = $this->convertIDs($val);
            } else {
                if(\is_int($val) && ($key === 'id' || \mb_substr($key, -3) === '_id')) {
                    $val = (string) $val;
                }
                
                $arr[$key] = $val;
            }
        }
        
        return (\is_object($data) ? ((object) $arr) : $arr);
    }
protected function convertIDs($data) {
        $arr = array();
        
        foreach($data as $key => $val) {
            if(\is_string($key) && $key[0] === ':') {
                $key = \mb_substr($key, 1);
            }
            
            if($val instanceof \CharlotteDunois\Kimberly\Atom) {
                $arr[$key] = (string) $val->atom;
            } elseif($val instanceof \CharlotteDunois\Kimberly\BaseObject) {
                $arr[$key] = $val->toArray();
            } elseif(\is_array($val) || \is_object($val)) {
                $arr[$key] = $this->convertIDs($val);
            } else {
                if(\is_int($val) && ($key === 'id' || \mb_substr($key, -3) === '_id')) {
                    $val = (string) $val;
                }
                
                $arr[$key] = $val;
            }
        }
        
        return (\is_object($data) ? ((object) $arr) : $arr);
    }
protected function convertIDs ( $ data ) { $ arr = array ( ) ; foreach ( $ data as $ key => $ val ) { if ( \ is_string ( $ key ) && $ key [ 0 ] === ':' ) { $ key = \ mb_substr ( $ key , 1 ) ; } if ( $ val instanceof \ CharlotteDunois \ Kimberly \ Atom ) { $ arr [ $ key ] = ( string ) $ val -> atom ; } elseif ( $ val instanceof \ CharlotteDunois \ Kimberly \ BaseObject ) { $ arr [ $ key ] = $ val -> toArray ( ) ; } elseif ( \ is_array ( $ val ) || \ is_object ( $ val ) ) { $ arr [ $ key ] = $ this -> convertIDs ( $ val ) ; } else { if ( \ is_int ( $ val ) && ( $ key === 'id' || \ mb_substr ( $ key , - 3 ) === '_id' ) ) { $ val = ( string ) $ val ; } $ arr [ $ key ] = $ val ; } } return ( \ is_object ( $ data ) ? ( ( object ) $ arr ) : $ arr ) ; }
Converts all IDs from integer to strings.
@param array|object  $data
@return array|object
Converts all IDs from integer to strings .