Datatypes
A datatype is the smallest possible entity of storage. It determines how a specific type of information should be validated, stored, retrieved, formatted and so on. eZ Publish comes with a collection of fundamental datatypes that can be used to build powerful and complex content structures. In addition, it is possible to extend the system by creating custom datatypes for special needs. Custom datatypes have to be programmed in PHP. However, the built in datatypes are usually sufficient enough for typical scenarios. The following table gives an overview of the most basic datatypes that come with eZ Publish.
Datatype | Description |
---|---|
Stores a single line of unformatted text |
|
Stores multiple lines of unformatted text |
|
Validates and stores multiple lines of formatted text |
|
Validates and stores a numerical integer value |
|
Validates and stores a numerical floating point value |
Please refer to the "Datatypes" section of the reference chapter for a comprehensive list of all the built-in datatypes. Additional datatypes can be downloaded from http://ez.no/community/contribs/datatypes; they are created by the members of the eZ Publish community.
Input validation
As the list above indicates, some datatypes take care of more than just storing data. For example, the "XML block" datatype apparently supports validation. This means that the inputted XML will be validated before it is actually stored in the database. In other words, the system will only accept and store the data if it is a valid XML structure. Input validation is supported by most (but not all) of the built in datatypes. The validation feature of a datatype can not be turned on or off. In other words, if a datatype happens to support validation, it will always try to validate the incoming data and thus the system will never allow the storage of incorrectly formatted input.
Balazs Halasy (20/01/2005 3:04 pm)
Geir Arne Waaler (13/09/2010 10:38 am)
Comments
There are no comments.