eZ Publish  [trunk]
eZFloatType Class Reference

Stores a float value. More...

+ Inheritance diagram for eZFloatType:
+ Collaboration diagram for eZFloatType:

List of all members.

Public Member Functions

 batchInitializeObjectAttributeData ($classAttribute)
 eZFloatType ()
 fetchClassAttributeHTTPInput ($http, $base, $classAttribute)
 fetchObjectAttributeHTTPInput ($http, $base, $contentObjectAttribute)
 fixupClassAttributeHTTPInput ($http, $base, $classAttribute)
 fixupObjectAttributeHTTPInput ($http, $base, $contentObjectAttribute)
 fromString ($contentObjectAttribute, $string)
 hasObjectAttributeContent ($contentObjectAttribute)
 initializeObjectAttribute ($contentObjectAttribute, $currentVersion, $originalContentObjectAttribute)
 metaData ($contentObjectAttribute)
 objectAttributeContent ($contentObjectAttribute)
 serializeContentClassAttribute ($classAttribute, $attributeNode, $attributeParametersNode)
 storeClassAttribute ($attribute, $version)
 storeObjectAttribute ($attribute)
 supportsBatchInitializeObjectAttribute ()
 title ($contentObjectAttribute, $name=null)
 toString ($contentObjectAttribute)
 unserializeContentClassAttribute ($classAttribute, $attributeNode, $attributeParametersNode)
 validateClassAttributeHTTPInput ($http, $base, $classAttribute)
 validateObjectAttributeHTTPInput ($http, $base, $contentObjectAttribute)

Public Attributes

 $FloatValidator
 The float value validator.
const DATA_TYPE_STRING = "ezfloat"
const DEFAULT_FIELD = "data_float3"
const DEFAULT_VARIABLE = "_ezfloat_default_value_"
const HAS_MAX_VALUE = 2
const HAS_MIN_MAX_VALUE = 3
const HAS_MIN_VALUE = 1
const INPUT_STATE_FIELD = "data_float4"
const MAX_FIELD = "data_float2"
const MAX_VARIABLE = "_ezfloat_max_float_value_"
const MIN_FIELD = "data_float1"
const MIN_VARIABLE = "_ezfloat_min_float_value_"
const NO_MIN_MAX_VALUE = 0

Detailed Description

Stores a float value.

Definition at line 18 of file ezfloattype.php.


Member Function Documentation

Reimplemented from eZDataType.

Definition at line 397 of file ezfloattype.php.

Definition at line 33 of file ezfloattype.php.

eZFloatType::fetchClassAttributeHTTPInput ( http,
base,
classAttribute 
)

Fetches the HTTP input for the content class attribute.

Note:
Default implementation does nothing.

Reimplemented from eZDataType.

Definition at line 166 of file ezfloattype.php.

eZFloatType::fetchObjectAttributeHTTPInput ( http,
base,
contentObjectAttribute 
)

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

Reimplemented from eZDataType.

Definition at line 68 of file ezfloattype.php.

eZFloatType::fixupClassAttributeHTTPInput ( http,
base,
classAttribute 
)

Tries to do a fixup on the input text so that it's acceptable as class attribute input.

Note:
Default implementation does nothing and returns accepted.

Reimplemented from eZDataType.

Definition at line 278 of file ezfloattype.php.

eZFloatType::fixupObjectAttributeHTTPInput ( http,
base,
objectAttribute 
)

Tries to do a fixup on the input text so that it's acceptable as object attribute input.

Note:
Default implementation does nothing.

Reimplemented from eZDataType.

Definition at line 158 of file ezfloattype.php.

eZFloatType::fromString ( contentObjectAttribute,
string 
)

Reimplemented from eZDataType.

Definition at line 341 of file ezfloattype.php.

eZFloatType::hasObjectAttributeContent ( contentObjectAttribute)
Returns:
true if the datatype finds any content in the attribute $contentObjectAttribute.

Reimplemented from eZDataType.

Definition at line 328 of file ezfloattype.php.

eZFloatType::initializeObjectAttribute ( contentObjectAttribute,
currentVersion,
originalContentObjectAttribute 
)

Sets the default value.

Reimplemented from eZDataType.

Definition at line 44 of file ezfloattype.php.

eZFloatType::metaData ( contentObjectAttribute)
Returns:
the text which should be indexed in the search engine. An associative array can be returned to enable searching in specific parts of the data. E.g. array( 'first_column' => "foo", 'second_column' => "bar" );

Reimplemented from eZDataType.

Definition at line 306 of file ezfloattype.php.

eZFloatType::objectAttributeContent ( contentObjectAttribute)

Returns the content.

Reimplemented from eZDataType.

Definition at line 314 of file ezfloattype.php.

eZFloatType::serializeContentClassAttribute ( classAttribute,
attributeNode,
attributeParametersNode 
)

Adds the necessary dom structure to the attribute parameters.

Note:
The default is to add unsupported='true' to the attribute node, meaning that the datatype does not support serializing.

Reimplemented from eZDataType.

Definition at line 346 of file ezfloattype.php.

eZFloatType::storeClassAttribute ( classAttribute,
version 
)

Stores the datatype data to the database which is related to the class attribute. The $version parameter determines which version is currently being stored, 0 is the real version while 1 is the temporary version.

Returns:
True if the value was stored correctly.
Note:
The method is entirely up to the datatype, for instance it could reuse the available types in the the attribute or store in a separate object.
This function is called after the attribute data has been stored. If you need to alter attribute data use preStoreClassAttribute instead.
See also:
fetchClassAttributeHTTPInput

Reimplemented from eZDataType.

Definition at line 302 of file ezfloattype.php.

eZFloatType::storeObjectAttribute ( objectAttribute)

Stores the datatype data to the database which is related to the object attribute.

Returns:
True if the value was stored correctly.
Note:
The method is entirely up to the datatype, for instance it could reuse the available types in the the attribute or store in a separate object.
See also:
fetchObjectAttributeHTTPInput

Reimplemented from eZDataType.

Definition at line 162 of file ezfloattype.php.

Reimplemented from eZDataType.

Definition at line 392 of file ezfloattype.php.

eZFloatType::title ( contentObjectAttribute,
name = null 
)

Returns the float value.

Reimplemented from eZDataType.

Definition at line 323 of file ezfloattype.php.

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

Reimplemented from eZDataType.

Definition at line 336 of file ezfloattype.php.

eZFloatType::unserializeContentClassAttribute ( classAttribute,
attributeNode,
attributeParametersNode 
)

Extracts values from the attribute parameters and sets it in the class attribute.

Note:
This function is called after the attribute has been stored and a second store is called after this function is done.

Reimplemented from eZDataType.

Definition at line 371 of file ezfloattype.php.

eZFloatType::validateClassAttributeHTTPInput ( http,
base,
classAttribute 
)

Validates the input for a class attribute and returns a validation state as defined in eZInputValidator.

Note:
Default implementation does nothing and returns accepted.

Reimplemented from eZDataType.

Definition at line 216 of file ezfloattype.php.

eZFloatType::validateObjectAttributeHTTPInput ( http,
base,
contentObjectAttribute 
)

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

Reimplemented from eZDataType.

Definition at line 90 of file ezfloattype.php.


Member Data Documentation

eZFloatType::$FloatValidator

The float value validator.

Definition at line 410 of file ezfloattype.php.

const eZFloatType::DATA_TYPE_STRING = "ezfloat"

Definition at line 20 of file ezfloattype.php.

const eZFloatType::DEFAULT_FIELD = "data_float3"

Definition at line 25 of file ezfloattype.php.

const eZFloatType::DEFAULT_VARIABLE = "_ezfloat_default_value_"

Definition at line 26 of file ezfloattype.php.

const eZFloatType::INPUT_STATE_FIELD = "data_float4"

Definition at line 27 of file ezfloattype.php.

const eZFloatType::MAX_FIELD = "data_float2"

Definition at line 23 of file ezfloattype.php.

const eZFloatType::MAX_VARIABLE = "_ezfloat_max_float_value_"

Definition at line 24 of file ezfloattype.php.

const eZFloatType::MIN_FIELD = "data_float1"

Definition at line 21 of file ezfloattype.php.

const eZFloatType::MIN_VARIABLE = "_ezfloat_min_float_value_"

Definition at line 22 of file ezfloattype.php.


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