app/Functions/FunctionsImport.php
public static function convertInlineMedia(Tree $tree, $gedrec): string
    {
        while (preg_match('/\n1 OBJE(?:\n[2-9].+)+/', $gedrec, $match)) {
            $gedrec = str_replace($match[0], self::createMediaObject(1, $match[0], $tree), $gedrec);
        }
        while (preg_match('/\n2 OBJE(?:\n[3-9].+)+/', $gedrec, $match)) {
            $gedrec = str_replace($match[0], self::createMediaObject(2, $match[0], $tree), $gedrec);
        }
        while (preg_match('/\n3 OBJE(?:\n[4-9].+)+/', $gedrec, $match)) {
            $gedrec = str_replace($match[0], self::createMediaObject(3, $match[0], $tree), $gedrec);
        }

        return $gedrec;
    }
public static function convertInlineMedia(Tree $tree, $gedrec): string
    {
        while (preg_match('/\n1 OBJE(?:\n[2-9].+)+/', $gedrec, $match)) {
            $gedrec = str_replace($match[0], self::createMediaObject(1, $match[0], $tree), $gedrec);
        }
        while (preg_match('/\n2 OBJE(?:\n[3-9].+)+/', $gedrec, $match)) {
            $gedrec = str_replace($match[0], self::createMediaObject(2, $match[0], $tree), $gedrec);
        }
        while (preg_match('/\n3 OBJE(?:\n[4-9].+)+/', $gedrec, $match)) {
            $gedrec = str_replace($match[0], self::createMediaObject(3, $match[0], $tree), $gedrec);
        }

        return $gedrec;
    }
public static function convertInlineMedia ( Tree $ tree , $ gedrec ) : string { while ( preg_match ( '/\n1 OBJE(?:\n[2-9].+)+/' , $ gedrec , $ match ) ) { $ gedrec = str_replace ( $ match [ 0 ] , self :: createMediaObject ( 1 , $ match [ 0 ] , $ tree ) , $ gedrec ) ; } while ( preg_match ( '/\n2 OBJE(?:\n[3-9].+)+/' , $ gedrec , $ match ) ) { $ gedrec = str_replace ( $ match [ 0 ] , self :: createMediaObject ( 2 , $ match [ 0 ] , $ tree ) , $ gedrec ) ; } while ( preg_match ( '/\n3 OBJE(?:\n[4-9].+)+/' , $ gedrec , $ match ) ) { $ gedrec = str_replace ( $ match [ 0 ] , self :: createMediaObject ( 3 , $ match [ 0 ] , $ tree ) , $ gedrec ) ; } return $ gedrec ; }
Extract inline media data, and convert to media objects.

@param Tree   $tree
@param string $gedrec

@return string
Extract inline media data and convert to media objects .