Validate/Isbn.php

Show: PublicProtectedPrivateinherited
Table of Contents
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 [email protected] so we can send you a copy immediately.
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Validate  
Version
$Id$  

\Zend_Validate_Isbn

Package: Zend_Validate
Parent(s)
\Zend_Validate_Abstract
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Constants

>VConstant  AUTO = 'auto'
>VConstant  ISBN10 = '10'
>VConstant  ISBN13 = '13'
>VConstant  INVALID = 'isbnInvalid'
>VConstant  NO_ISBN = 'isbnNoIsbn'

Properties

>VPropertyprotectedarray $_messageTemplates = array(self::INVALID => "Invalid type given. String or integer expected", self::NO_ISBN => "'%value%' is not a valid ISBN number")
Validation failure message template definitions.
Default valuearray(self::INVALID => "Invalid type given. String or integer expected", self::NO_ISBN => "'%value%' is not a valid ISBN number")Details
Type
array
>VPropertyprotectedstring $_separator = ''
Separator character.
Default value''Details
Type
string
>VPropertyprotectedstring $_type = self::AUTO
Allowed type.
Default valueself::AUTODetails
Type
string

Methods

methodpublic__construct(\Zend_Config | array $options = array()) : void

Set up options.

Parameters
NameTypeDescription
$options\Zend_Config | array
Throws
ExceptionDescription
\Zend_Validate_ExceptionWhen $options is not valid
methodprotected_detectFormat() : string

Detect input format.

Returns
TypeDescription
string
methodpublicgetSeparator() : string

Get separator characters.

Returns
TypeDescription
string
methodpublicgetType() : string

Get allowed ISBN type.

Returns
TypeDescription
string
methodpublicisValid(string $value) : boolean

Defined by Zend_Validate_Interface.

Returns true if and only if $value is a valid ISBN.
Parameters
NameTypeDescription
$valuestring
Returns
TypeDescription
boolean
methodpublicsetSeparator(string $separator) : \Zend_Validate_Isbn

Set separator characters.

It is allowed only empty string, hyphen and space.
Parameters
NameTypeDescription
$separatorstring
Returns
TypeDescription
\Zend_Validate_IsbnProvides a fluent interface
Throws
ExceptionDescription
\Zend_Validate_ExceptionWhen $separator is not valid
methodpublicsetType(string $type) : \Zend_Validate_Isbn

Set allowed ISBN type.

Parameters
NameTypeDescription
$typestring
Returns
TypeDescription
\Zend_Validate_IsbnProvides a fluent interface
Throws
ExceptionDescription
\Zend_Validate_ExceptionWhen $type is not valid
Documentation was generated by phpDocumentor 2.2.0 .