• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • Examples
  • File List

E:/E/GEAMP/www/openbiz/openbiz/others/Zend/Validate/Sitemap/Priority.php

00001 <?php
00026 require_once 'Zend/Validate/Abstract.php';
00027 
00039 class Zend_Validate_Sitemap_Priority extends Zend_Validate_Abstract
00040 {
00045     const NOT_VALID = 'invalidSitemapPriority';
00046 
00052     protected $_messageTemplates = array(
00053         self::NOT_VALID => "'%value%' is not a valid sitemap priority",
00054     );
00055 
00064     public function isValid($value)
00065     {
00066         $this->_setValue($value);
00067 
00068         if (!is_numeric($value)) {
00069             return false;
00070         }
00071 
00072         $value = (float)$value;
00073         return $value >= 0 && $value <= 1;
00074     }
00075 }

Generated on Thu Apr 19 2012 17:01:17 for openbiz by  doxygen 1.7.2