]> _ Git - cubist_util.git/commitdiff
wait #7612
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 25 Jun 2025 09:51:17 +0000 (11:51 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 25 Jun 2025 09:51:17 +0000 (11:51 +0200)
src/Graphics/Lottie.php

index a03f939c6d8352435093658fe41c8d4472529086..8e888f1dfe1fe9dbf467133d2461541a36b68a82 100644 (file)
@@ -15,7 +15,7 @@ class Lottie
     public static function getAnimationDataFromHTMLFile($path)
     {
         $htmlContent = Text::fileGetContentsNormalizedLines($path);
-        if (stristr($htmlContent, '<div id="lottie"></div>')) {
+        if (self::isLottie($htmlContent)) {
             if (preg_match('/var animationData = (\{.*\})/', $htmlContent, $m)) {
                 return json_decode(trim($m[1]), true);
             }
@@ -23,4 +23,9 @@ class Lottie
         return false;
     }
 
+    public static function isLottie($html)
+    {
+        return stristr($html, '<div id="lottie"></div>');
+    }
+
 }
\ No newline at end of file