Define archive builders and formatters
nouveau fichier: core/lib/Thelia/Core/FileFormat/Archive/AbstractArchiveBuilder.php nouveau fichier: core/lib/Thelia/Core/FileFormat/Archive/ArchiveBuilder/ZipArchiveBuilder.php nouveau fichier: core/lib/Thelia/Core/FileFormat/Archive/ArchiveBuilder/ZipArchiveException.php nouveau fichier: core/lib/Thelia/Core/FileFormat/Archive/ArchiveBuilderInterface.php nouveau fichier: core/lib/Thelia/Core/FileFormat/Archive/ArchiveBuilderManager.php nouveau fichier: core/lib/Thelia/Core/FileFormat/FormatInterface.php nouveau fichier: core/lib/Thelia/Core/FileFormat/Formatter/AbstractFormatter.php nouveau fichier: core/lib/Thelia/Core/FileFormat/Formatter/Exception/BadFormattedStringException.php nouveau fichier: core/lib/Thelia/Core/FileFormat/Formatter/FormatterManager.php nouveau fichier: core/lib/Thelia/Tests/FileFormat/Archive/ArchiveBuilder/TestResources/bad_formatted.zip nouveau fichier: core/lib/Thelia/Tests/FileFormat/Archive/ArchiveBuilder/TestResources/test_file nouveau fichier: core/lib/Thelia/Tests/FileFormat/Archive/ArchiveBuilder/TestResources/well_formatted.zip nouveau fichier: core/lib/Thelia/Tests/FileFormat/Archive/ArchiveBuilder/ZipArchiveBuilderTest.php nouveau fichier: core/lib/Thelia/Tests/FileFormat/Archive/ArchiveBuilderManagerTest.php nouveau fichier: core/lib/Thelia/Tests/FileFormat/Formatter/FormatterManagerTest.php nouveau fichier: core/lib/Thelia/Tests/Tools/FakeFileDownloader.php nouveau fichier: core/lib/Thelia/Tests/Tools/FileDownloaderTest.php nouveau fichier: core/lib/Thelia/Tools/FileDownload/FileDownloader.php nouveau fichier: core/lib/Thelia/Tools/FileDownload/FileDownloaderAwareTrait.php nouveau fichier: core/lib/Thelia/Tools/FileDownload/FileDownloaderInterface.php modifié: core/lib/Thelia/Tools/URL.php
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
namespace Thelia\Tools;
|
||||
|
||||
use Symfony\Component\Routing\RequestContext;
|
||||
use Symfony\Component\Validator\Constraints\UrlValidator;
|
||||
use Thelia\Model\ConfigQuery;
|
||||
use Thelia\Rewriting\RewritingResolver;
|
||||
use Thelia\Rewriting\RewritingRetriever;
|
||||
@@ -313,4 +314,11 @@ class URL
|
||||
strtolower($clean) :
|
||||
$clean;
|
||||
}
|
||||
|
||||
public function checkUrl($url, array $protocols = ["http", "https"])
|
||||
{
|
||||
$pattern = sprintf(UrlValidator::PATTERN, implode('|', $protocols));
|
||||
|
||||
return (bool) preg_match($pattern, $url);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user