rework crawler; add atom link extraction
[phinde.git] / src / phinde / Helper.php
index 0b985217cc1ac3e61d8c033baa646303857e7776..40ea751442a2b62eb17e84a09694b5abbe41d34b 100644 (file)
@@ -20,5 +20,15 @@ class Helper
             $url
         );
     }
             $url
         );
     }
+
+    public static function addSchema($url)
+    {
+        if (substr($url, 0, 7) == 'http://'
+            || substr($url, 0, 8) == 'https://'
+        ) {
+            return $url;
+        }
+        return 'http://' . $url;
+    }
 }
 ?>
 }
 ?>