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
Changefreq.php
Go to the documentation of this file.
1
<?php
26
#require_once 'Zend/Validate/Abstract.php';
27
39
class
Zend_Validate_Sitemap_Changefreq
extends
Zend_Validate_Abstract
40
{
45
const
NOT_VALID
=
'sitemapChangefreqNotValid'
;
46
const
INVALID
=
'sitemapChangefreqInvalid'
;
47
53
protected
$_messageTemplates
= array(
54
self::NOT_VALID =>
"'%value%' is not a valid sitemap changefreq"
,
55
self::INVALID =>
"Invalid type given. String expected"
,
56
);
57
63
protected
$_changeFreqs
= array(
64
'always'
,
'hourly'
,
'daily'
,
'weekly'
,
65
'monthly'
,
'yearly'
,
'never'
66
);
67
76
public
function
isValid
(
$value
)
77
{
78
if
(!is_string(
$value
)) {
79
$this->
_error
(self::INVALID);
80
return
false
;
81
}
82
83
$this->
_setValue
(
$value
);
84
if
(!is_string(
$value
)) {
85
return
false
;
86
}
87
88
if
(!in_array(
$value
, $this->_changeFreqs,
true
)) {
89
$this->
_error
(self::NOT_VALID);
90
return
false
;
91
}
92
93
return
true
;
94
}
95
}
Zend_Validate_Sitemap_Changefreq\NOT_VALID
const NOT_VALID
Definition:
Changefreq.php:45
Zend_Validate_Sitemap_Changefreq
Definition:
Changefreq.php:39
Zend_Validate_Sitemap_Changefreq\INVALID
const INVALID
Definition:
Changefreq.php:46
Zend_Validate_Sitemap_Changefreq\isValid
isValid($value)
Definition:
Changefreq.php:76
Zend_Validate_Sitemap_Changefreq\$_changeFreqs
$_changeFreqs
Definition:
Changefreq.php:63
Zend_Validate_Abstract\_error
_error($messageKey, $value=null)
Definition:
Abstract.php:284
$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_Changefreq\$_messageTemplates
$_messageTemplates
Definition:
Changefreq.php:53