API Documentation

Zend/Validate/Isbn.php

Show: inherited
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 license@zend.com so we can send you a copy immediately.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Validate  
Version
$Id: Isbn.php 24594 2012-01-05 21:27:01Z matthew $  

\Zend_Validate_Isbn

Package: Zend\Validate

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

Constants

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

Properties

Propertyprotectedarray  $_messageTemplates= 'array( self::INVALID => "Invalid type given. String or integer expected"'

Validation failure message template definitions.

Default valuearray( self::INVALID => "Invalid type given. String or integer expected"Details
Type
array
Propertyprotectedstring  $_separator= ''''

Separator character.

Default value''Details
Type
string
Propertyprotectedstring  $_type= 'self::AUTO'

Allowed type.

Default valueself::AUTODetails
Type
string

Methods

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

Set up options.

Parameters
Name Type Description
$options \Zend_Config|array
Throws
Exception Description
\Zend_Validate_Exception When $options is not valid
methodprotected_detectFormat( ) : string

Detect input format.

Returns
Type Description
string
methodpublicgetSeparator( ) : string

Get separator characters.

Returns
Type Description
string
methodpublicgetType( ) : string

Get allowed ISBN type.

Returns
Type Description
string
methodpublicisValid( string $value ) : boolean

Defined by Zend_Validate_Interface.

Returns true if and only if $value is a valid ISBN.

Parameters
Name Type Description
$value string
Returns
Type Description
boolean
methodpublicsetSeparator( string $separator ) : \Zend_Validate_Isbn

Set separator characters.

It is allowed only empty string, hyphen and space.

Parameters
Name Type Description
$separator string
Returns
Type Description
\Zend_Validate_Isbn Provides a fluent interface
Throws
Exception Description
\Zend_Validate_Exception When $separator is not valid
methodpublicsetType( string $type ) : \Zend_Validate_Isbn

Set allowed ISBN type.

Parameters
Name Type Description
$type string
Returns
Type Description
\Zend_Validate_Isbn Provides a fluent interface
Throws
Exception Description
\Zend_Validate_Exception When $type is not valid
Documentation was generated by DocBlox 0.15.1.