Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
framework
Validator
Url.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\Validator
;
7
11
class
Url
12
{
20
public
function
isValid
(
$value
, array $allowedSchemes = [])
21
{
22
$isValid =
true
;
23
24
if
(!filter_var(
$value
, FILTER_VALIDATE_URL)) {
25
$isValid =
false
;
26
}
27
28
if
($isValid && !empty($allowedSchemes)) {
29
$url
= parse_url(
$value
);
30
if
(empty(
$url
[
'scheme'
]) || !in_array(
$url
[
'scheme'
], $allowedSchemes)) {
31
$isValid =
false
;
32
}
33
}
34
35
return
$isValid;
36
}
37
}
$url
$url
Definition:
query_redirect.php:14
Magento\Framework\Validator\Url\isValid
isValid($value, array $allowedSchemes=[])
Definition:
Url.php:20
$value
$value
Definition:
gender.phtml:16
Magento\Framework\Validator
Definition:
AbstractValidator.php:6
Magento\Framework\Validator\Url
Definition:
Url.php:11