eZ Publish  [4.2]
eZISBNType Class Reference

Handles ISBN type strings. More...

+ Inheritance diagram for eZISBNType:
+ Collaboration diagram for eZISBNType:

List of all members.

Public Member Functions

 classAttributeContent ($classAttribute)
 cleanDBDataBeforeImport ()
 customClassAttributeHTTPAction ($http, $action, $classAttribute)
 eZISBNType ()
 fetchClassAttributeHTTPInput ($http, $base, $classAttribute)
 fetchObjectAttributeHTTPInput ($http, $base, $contentObjectAttribute)
 fromString ($contentObjectAttribute, $string)
 hasObjectAttributeContent ($contentObjectAttribute)
 initializeClassAttribute ($classAttribute)
 isIndexable ()
 metaData ($contentObjectAttribute)
 objectAttributeContent ($contentObjectAttribute)
 preStoreClassAttribute ($classAttribute, $version)
 storeClassAttributeContent ($classAttribute, $content)
 storeObjectAttribute ($attribute)
 supportsBatchInitializeObjectAttribute ()
 title ($data_instance, $name=null)
 toString ($contentObjectAttribute)
 validateObjectAttributeHTTPInput ($http, $base, $contentObjectAttribute)

Static Public Member Functions

static convertISBN10toISBN13 ($isbnNr)

Public Attributes

const CLASS_IS_ISBN13 = 'data_int1'
const CONTENT_VALUE = 'data_text'
const DATA_TYPE_STRING = "ezisbn"

Private Member Functions

 validateISBN13Checksum ($isbnNr, &$error)
 validateISBNChecksum ($isbnNr)

Detailed Description

Handles ISBN type strings.

Definition at line 37 of file ezisbntype.php.


Member Function Documentation

eZISBNType::classAttributeContent ( classAttribute)

Returns the content data for the given content class attribute.

Reimplemented from eZDataType.

Definition at line 367 of file ezisbntype.php.

eZISBNType::cleanDBDataBeforeImport ( )

See also eZDataType:cleanDBDataBeforeImport().

Reimplemented from eZDataType.

Definition at line 438 of file ezisbntype.php.

static eZISBNType::convertISBN10toISBN13 ( isbnNr) [static]

Calculate the ISBN-13 checkdigit and return a valid ISBN-13 number based on an ISBN-10 number as input.

Returns:
a valid ISBN-13 number.

Definition at line 208 of file ezisbntype.php.

Referenced by fetchObjectAttributeHTTPInput(), and eZISBN10To13Converter\updateContentObjectAttribute().

eZISBNType::customClassAttributeHTTPAction ( http,
action,
classAttribute 
)

Executes a custom action for a class attribute which was defined on the web page.

Note:
Default implementation does nothing.

Reimplemented from eZDataType.

Definition at line 287 of file ezisbntype.php.

eZISBNType::eZISBNType ( )

Definition at line 43 of file ezisbntype.php.

eZISBNType::fetchClassAttributeHTTPInput ( http,
base,
classAttribute 
)

Fetches the HTTP input for the content class attribute.

Note:
Default implementation does nothing.

Reimplemented from eZDataType.

Definition at line 298 of file ezisbntype.php.

eZISBNType::fetchObjectAttributeHTTPInput ( http,
base,
contentObjectAttribute 
)

Fetches the http post var string input and stores it in the data instance.

Reimplemented from eZDataType.

Definition at line 232 of file ezisbntype.php.

eZISBNType::fromString ( contentObjectAttribute,
string 
)

Reimplemented from eZDataType.

Definition at line 402 of file ezisbntype.php.

eZISBNType::hasObjectAttributeContent ( contentObjectAttribute)

Check if an ISBN value exist in the datatype.

Reimplemented from eZDataType.

Definition at line 430 of file ezisbntype.php.

eZISBNType::initializeClassAttribute ( classAttribute)

Initializes the class attribute. data_int will be se default to 1, as this is ISBN-13.

Reimplemented from eZDataType.

Definition at line 419 of file ezisbntype.php.

eZISBNType::isIndexable ( )

ISBN numbers are indexable, returns true.

Reimplemented from eZDataType.

Definition at line 380 of file ezisbntype.php.

eZISBNType::metaData ( contentObjectAttribute)

Returns the meta data used for storing search indeces.

Reimplemented from eZDataType.

Definition at line 388 of file ezisbntype.php.

eZISBNType::objectAttributeContent ( contentObjectAttribute)

Returns the content.

Reimplemented from eZDataType.

Definition at line 338 of file ezisbntype.php.

eZISBNType::preStoreClassAttribute ( classAttribute,
version 
)

Similar to the storeClassAttribute but is called before the attribute itself is stored and can be used to set values in the class attribute.

Returns:
True if the value was stored correctly.
See also:
fetchClassAttributeHTTPInput

Reimplemented from eZDataType.

Definition at line 320 of file ezisbntype.php.

eZISBNType::storeClassAttributeContent ( classAttribute,
content 
)

Definition at line 325 of file ezisbntype.php.

Referenced by preStoreClassAttribute().

eZISBNType::storeObjectAttribute ( attribute)

Store the content.

Reimplemented from eZDataType.

Definition at line 316 of file ezisbntype.php.

eZISBNType::supportsBatchInitializeObjectAttribute ( )

Reimplemented from eZDataType.

Definition at line 446 of file ezisbntype.php.

eZISBNType::title ( data_instance,
name = null 
)

Returns the text.

Reimplemented from eZDataType.

Definition at line 410 of file ezisbntype.php.

eZISBNType::toString ( contentObjectAttribute)
Returns:
string representation of an contentobjectattribute data for simplified export

Reimplemented from eZDataType.

Definition at line 397 of file ezisbntype.php.

eZISBNType::validateISBN13Checksum ( isbnNr,
&$  error 
) [private]
Deprecated:
, should use the class eZISBN13 instead. Validates the ISBN-13 number $isbnNr.
Parameters:
$isbnNrA string containing the number without any dashes.
Returns:
true if it is valid.

Definition at line 195 of file ezisbntype.php.

eZISBNType::validateISBNChecksum ( isbnNr) [private]

Validates the ISBN number $isbnNr. All characters should be numeric except the last digit that may be the character X, which should be calculated as 10.

Parameters:
$isbnNrA string containing the number without any dashes.
Returns:
true if it is valid.

Definition at line 163 of file ezisbntype.php.

Referenced by validateObjectAttributeHTTPInput().

eZISBNType::validateObjectAttributeHTTPInput ( http,
base,
contentObjectAttribute 
)

Validates the input and returns true if the input was valid for this datatype.

Reimplemented from eZDataType.

Definition at line 54 of file ezisbntype.php.


Member Data Documentation

const eZISBNType::CLASS_IS_ISBN13 = 'data_int1'

Definition at line 40 of file ezisbntype.php.

const eZISBNType::CONTENT_VALUE = 'data_text'

Definition at line 41 of file ezisbntype.php.

const eZISBNType::DATA_TYPE_STRING = "ezisbn"

Definition at line 39 of file ezisbntype.php.


The documentation for this class was generated from the following file: