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
zendframework1
library
Zend
Validate
Sitemap
Lastmod.php
Go to the documentation of this file.
1
<?php
26
#require_once 'Zend/Validate/Abstract.php';
27
39
class
Zend_Validate_Sitemap_Lastmod
extends
Zend_Validate_Abstract
40
{
45
const
LASTMOD_REGEX
=
'/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])(T([0-1][0-9]|2[0-3])(:[0-5][0-9])(:[0-5][0-9])?(\\+|-)([0-1][0-9]|2[0-3]):[0-5][0-9])?$/'
;
46
51
const
NOT_VALID
=
'sitemapLastmodNotValid'
;
52
const
INVALID
=
'sitemapLastmodInvalid'
;
53
59
protected
$_messageTemplates
= array(
60
self::NOT_VALID =>
"'%value%' is not a valid sitemap lastmod"
,
61
self::INVALID =>
"Invalid type given. String expected"
,
62
);
63
72
public
function
isValid
(
$value
)
73
{
74
if
(!is_string(
$value
)) {
75
$this->
_error
(self::INVALID);
76
return
false
;
77
}
78
79
$this->
_setValue
(
$value
);
80
$result
= @preg_match(self::LASTMOD_REGEX,
$value
);
81
if
(
$result
!= 1) {
82
$this->
_error
(self::NOT_VALID);
83
return
false
;
84
}
85
86
return
true
;
87
}
88
}
$result
$result
Definition:
product_configurable_not_available_rollback.php:26
Zend_Validate_Sitemap_Lastmod\LASTMOD_REGEX
const LASTMOD_REGEX
Definition:
Lastmod.php:45
Zend_Validate_Sitemap_Lastmod\$_messageTemplates
$_messageTemplates
Definition:
Lastmod.php:59
Zend_Validate_Abstract\_error
_error($messageKey, $value=null)
Definition:
Abstract.php:284
Zend_Validate_Sitemap_Lastmod\NOT_VALID
const NOT_VALID
Definition:
Lastmod.php:51
Zend_Validate_Sitemap_Lastmod
Definition:
Lastmod.php:39
$value
$value
Definition:
gender.phtml:16
Zend_Validate_Abstract
Definition:
Abstract.php:33
Zend_Validate_Abstract\_setValue
_setValue($value)
Definition:
Abstract.php:303
Zend_Validate_Sitemap_Lastmod\isValid
isValid($value)
Definition:
Lastmod.php:72
Zend_Validate_Sitemap_Lastmod\INVALID
const INVALID
Definition:
Lastmod.php:52