<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Validate
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/
/**
* @see Zend_Validate_Abstract
*/
require_once 'Zend/Validate/Abstract.php';
/**
* @category Zend
* @package Zend_Validate
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Validate_Hex extends Zend_Validate_Abstract
{
const INVALID = 'hexInvalid';
const NOT_HEX = 'notHex';
/**
* Validation failure message template definitions
*
* @var array
*/
protected $_messageTemplates = array(
self::INVALID => "Invalid type given. String expected",
self::NOT_HEX => "'%value%' has not only hexadecimal digit characters",
);
/**
* Defined by Zend_Validate_Interface
*
* Returns true if and only if $value contains only hexadecimal digit characters
*
* @param string $value
* @return boolean
*/
public function isValid($value)
{
if (!is_string($value) && !is_int($value)) {
$this->_error(self::INVALID);
return false;
}
$this->_setValue($value);
if (!ctype_xdigit((string) $value)) {
$this->_error(self::NOT_HEX);
return false;
}
return true;
}
}
| nama | waktu | ukuran | owner | perm | aksi |
|---|---|---|---|---|---|
| .. | |||||
| Barcode/ | 2016-11-07 16:01 | 55.37 KB | 76129f60960:kunden | dxwrx-rx-r | |
| Db/ | 2016-11-07 16:01 | 12.35 KB | 76129f60960:kunden | dxwrx-rx-r | |
| File/ | 2016-11-07 16:01 | 107.18 KB | 76129f60960:kunden | dxwrx-rx-r | |
| Hostname/ | 2016-11-07 16:01 | 449.52 KB | 76129f60960:kunden | dxwrx-rx-r | |
| Ldap/ | 2016-11-07 16:01 | 1.77 KB | 76129f60960:kunden | dxwrx-rx-r | |
| Sitemap/ | 2016-11-07 16:01 | 9.64 KB | 76129f60960:kunden | dxwrx-rx-r | |
| Abstract.php | 2016-11-07 15:59 | 12.05 KB | 76129f60960:kunden | -xw-x----- | |
| Alnum.php | 2016-11-07 15:59 | 3.97 KB | 76129f60960:kunden | -xw-x----- | |
| Alpha.php | 2016-11-07 15:59 | 3.88 KB | 76129f60960:kunden | -xw-x----- | |
| Barcode.php | 2016-11-07 15:59 | 6.14 KB | 76129f60960:kunden | -xw-x----- | |
| Between.php | 2016-11-07 15:59 | 5.51 KB | 76129f60960:kunden | -xw-x----- | |
| Callback.php | 2016-11-07 15:59 | 4.32 KB | 76129f60960:kunden | -xw-x----- | |
| Ccnum.php | 2016-11-07 15:59 | 3.02 KB | 76129f60960:kunden | -xw-x----- | |
| CreditCard.php | 2016-11-07 15:59 | 9.81 KB | 76129f60960:kunden | -xw-x----- | |
| Date.php | 2016-11-07 15:59 | 7.47 KB | 76129f60960:kunden | -xw-x----- | |
| Digits.php | 2016-11-07 15:59 | 2.52 KB | 76129f60960:kunden | -xw-x----- | |
| EmailAddress.php | 2016-11-07 15:59 | 17.27 KB | 76129f60960:kunden | -xw-x----- | |
| Exception.php | 2016-11-07 15:59 | 1.02 KB | 76129f60960:kunden | -xw-x----- | |
| Float.php | 2016-11-07 15:59 | 3.38 KB | 76129f60960:kunden | -xw-x----- | |
| GreaterThan.php | 2016-11-07 15:59 | 2.78 KB | 76129f60960:kunden | -xw-x----- | |
| Hex.php | 2016-11-07 15:59 | 1.94 KB | 76129f60960:kunden | -xw-x----- | |
| Hostname.php | 2016-11-07 15:59 | 35.58 KB | 76129f60960:kunden | -xw-x----- | |
| Iban.php | 2016-11-07 15:59 | 7.08 KB | 76129f60960:kunden | -xw-x----- | |
| Identical.php | 2016-11-07 15:59 | 3.95 KB | 76129f60960:kunden | -xw-x----- | |
| InArray.php | 2016-11-07 15:59 | 5.12 KB | 76129f60960:kunden | -xw-x----- | |
| Int.php | 2016-11-07 15:59 | 3.87 KB | 76129f60960:kunden | -xw-x----- | |
| Interface.php | 2016-11-07 15:59 | 1.83 KB | 76129f60960:kunden | -xw-x----- | |
| Ip.php | 2016-11-07 15:59 | 5.33 KB | 76129f60960:kunden | -xw-x----- | |
| Isbn.php | 2016-11-07 15:59 | 7.48 KB | 76129f60960:kunden | -xw-x----- | |
| LessThan.php | 2016-11-07 15:59 | 2.75 KB | 76129f60960:kunden | -xw-x----- | |
| NotEmpty.php | 2016-11-07 15:59 | 7.89 KB | 76129f60960:kunden | -xw-x----- | |
| PostCode.php | 2016-11-07 15:59 | 5.81 KB | 76129f60960:kunden | -xw-x----- | |
| Regex.php | 2016-11-07 15:59 | 3.87 KB | 76129f60960:kunden | -xw-x----- | |
| StringLength.php | 2016-11-07 15:59 | 6.77 KB | 76129f60960:kunden | -xw-x----- | |