ISBN
[ class tree: ISBN ] [ index: ISBN ] [ all elements ]

Class: ISBN

Source Location: /ISBN.php

Class Overview


ISBN class


Author(s):

Copyright:

  • 2006-2007 Tom Klingenberg

Methods



Class Details

[line 115]
ISBN class

Class to Handle, Convert and Validate ISBN Numbers




Tags:

since:  Class available since Release 0.0.0
link:  http://isbn.lastflood.com/
license:  LGPL
copyright:  2006-2007 Tom Klingenberg
author:  Tom Klingenberg <tkli-php@lastflood.net>


[ Top ]


Class Methods


static method convert [line 1342]

static string|false convert( string $isbnin, [integer $verfrom = ISBN_VERSION_ISBN_10], [integer $verto = ISBN_VERSION_ISBN_13])

converts an ISBN number from one version to another



Tags:

return:  converted ISBN Number or false if conversion failed
access:  public


Parameters:

string   $isbnin   ISBN to convert, must be a valid ISBN Number
integer   $verfrom   version value of the input ISBN
integer   $verto   version value to convert to

[ Top ]

static method guessVersion [line 1748]

static integer|false guessVersion( string $isbn)

Guesses ISBN version of passed string

Note: This is not Validation. To get the validated version of an ISBN Number use self::validate();




Tags:

return:  Version Value or false if failed
access:  public
see:  validate();


Parameters:

string   $isbn   ISBN Number to guess Version of

[ Top ]

static method validate [line 1703]

static integer|false validate( string $isbn, [integer $ver = ISBN_DEFAULT_INPUTVERSION])

Validates an ISBN



Tags:

return:  Version value of a valid ISBN or false if it did not validate
access:  public


Parameters:

string   $isbn   ISBN to validate
integer   $ver   ISBN-Version to validate against

[ Top ]

constructor __construct [line 146]

ISBN __construct( [array $isbn = ''], [mixed $ver = ISBN_DEFAULT_INPUTVERSION])

Constructor



Tags:

throws:  ISBN_Exception in case it fails
access:  public


Parameters:

array   $isbn   String of ISBN Value to use
mixed   $ver   Optional Version Constant

[ Top ]

method getCheckdigit [line 1379]

string|false getCheckdigit( )

Get the Checkdigit Part of ISBN Number



Tags:

return:  Checkdigit or false if failed
access:  public


[ Top ]

method getEAN [line 1405]

string|false getEAN( )

Get the EAN Prefix of ISBN Number (ISBN-13)



Tags:

return:  EAN Prefix or false if failed
access:  public


[ Top ]

method getGroup [line 1427]

string|false getGroup( )

Get the Registrationgroup Part of the ISBN Number



Tags:

return:  Group Identifier or false if failed
access:  public


[ Top ]

method getISBN [line 1470]

string getISBN( )

Get whole ISBN Number



Tags:

return:  ISBN Number (unformatted); empty string if this is not a valid ISBN
access:  public


[ Top ]

method getPublisher [line 1661]

string|false getPublisher( )

Get the Publication Part of the ISBN Number



Tags:

return:  Publisher or false if failed
access:  public


[ Top ]

method getTitle [line 1673]

string|false getTitle( )

Get the Title Part of the ISBN Number



Tags:

return:  Title or false if failed
access:  public


[ Top ]

method getVersion [line 1729]

integer|false getVersion( )

Returns version of this objects ISBN



Tags:

return:  Version value or ISBN_VERSION_NONE
access:  public


[ Top ]

method isValid [line 1686]

boolean isValid( )

Returns this ISBN validity



Tags:

access:  public


[ Top ]

method setISBN [line 1505]

void setISBN( string $isbn)

Setter for ISBN



Tags:

access:  public
throws:  ISBN_Exception in case it fails


Parameters:

string   $isbn   ISBN Number this is a valid ISBN Number or it is an Empty string which will reset the class

[ Top ]


Documentation generated on Fri, 19 Jan 2007 13:42:28 +0100 by phpDocumentor 1.3.1