‪TYPO3CMS  10.4
TYPO3\CMS\Extbase\Persistence\Generic\PropertyType Class Reference

Static Public Member Functions

static string nameFromValue ($type)
 
static int valueFromName ($name)
 
static int valueFromType ($type)
 

Public Attributes

const UNDEFINED = 0
 
const STRING = 1
 
const BINARY = 2
 
const LONG = 3
 
const DOUBLE = 4
 
const DATE = 5
 
const BOOLEAN = 6
 
const NAME = 7
 
const PATH = 8
 
const REFERENCE = 9
 
const WEAKREFERENCE = 10
 
const URI = 11
 
const DECIMAL = 12
 
const INTEGER = 13
 
const TYPENAME_UNDEFINED = 'undefined'
 
const TYPENAME_STRING = 'String'
 
const TYPENAME_BINARY = 'Binary'
 
const TYPENAME_LONG = 'Long'
 
const TYPENAME_DOUBLE = 'Double'
 
const TYPENAME_DATE = 'Date'
 
const TYPENAME_BOOLEAN = 'Boolean'
 
const TYPENAME_NAME = 'Name'
 
const TYPENAME_PATH = 'Path'
 
const TYPENAME_REFERENCE = 'Reference'
 
const TYPENAME_WEAKREFERENCE = 'WeakReference'
 
const TYPENAME_URI = 'URI'
 
const TYPENAME_DECIMAL = 'Decimal'
 
const TYPENAME_INTEGER = 'Integer'
 

Private Member Functions

 __construct ()
 

Detailed Description

The property types supported by the JCR standard.

The STRING property type is used to store strings. BINARY properties are used to store binary data. The LONG property type is used to store integers. The DECIMAL property type is used to store precise decimal numbers. The DOUBLE property type is used to store floating point numbers. The DATE property type is used to store time and date information. See 4.2.6.1 Date in the specification. The BOOLEAN property type is used to store boolean values. A NAME is a pairing of a namespace and a local name. When read, the namespace is mapped to the current prefix. See 4.2.6.2 Name in the specification. A PATH property is an ordered list of path elements. A path element is a NAME with an optional index. When read, the NAMEs within the path are mapped to their current prefix. A path may be absolute or relative. See 4.2.6.3 Path in the specification. A REFERENCE property stores the identifier of a referenceable node (one having type mix:referenceable), which must exist within the same workspace or session as the REFERENCE property. A REFERENCE property enforces this referential integrity by preventing (in level 2 implementations) the removal of its target node. See 4.2.6.4 Reference in the specification. A WEAKREFERENCE property stores the identifier of a referenceable node (one having type mix:referenceable). A WEAKREFERENCE property does not enforce referential integrity. See 4.2.6.5 Weak Reference in the specification. A URI property is identical to STRING property except that it only accepts values that conform to the syntax of a URI-reference as defined in RFC 3986. See also 4.2.6.6 URI in the specification. UNDEFINED can be used within a property definition (see 4.7.5 Property Definitions) to specify that the property in question may be of any type. However, it cannot be the actual type of any property instance. For example it will never be returned by Property.getType() and (in level 2 implementations) it cannot be assigned as the type when creating a new property.

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 37 of file PropertyType.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Extbase\Persistence\Generic\PropertyType::__construct ( )
private

Make instantiation impossible...

Definition at line 209 of file PropertyType.php.

Member Function Documentation

◆ nameFromValue()

static string TYPO3\CMS\Extbase\Persistence\Generic\PropertyType::nameFromValue (   $type)
static

Returns the name of the specified type, as used in serialization.

Parameters
int$type‪type the property type
Returns
‪string name of the specified type

Definition at line 219 of file PropertyType.php.

References TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\BINARY, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\BOOLEAN, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\DATE, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\DECIMAL, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\DOUBLE, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\INTEGER, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\LONG, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\NAME, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\PATH, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\REFERENCE, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\STRING, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\TYPENAME_BINARY, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\TYPENAME_BOOLEAN, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\TYPENAME_DATE, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\TYPENAME_DECIMAL, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\TYPENAME_DOUBLE, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\TYPENAME_INTEGER, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\TYPENAME_LONG, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\TYPENAME_NAME, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\TYPENAME_PATH, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\TYPENAME_REFERENCE, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\TYPENAME_STRING, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\TYPENAME_UNDEFINED, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\TYPENAME_URI, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\TYPENAME_WEAKREFERENCE, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\URI, and TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\WEAKREFERENCE.

◆ valueFromName()

static int TYPO3\CMS\Extbase\Persistence\Generic\PropertyType::valueFromName (   $name)
static

Returns the numeric constant value of the type with the specified name.

Parameters
string$name‪The name of the property type
Returns
‪int The numeric constant value

Definition at line 275 of file PropertyType.php.

References TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\BINARY, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\BOOLEAN, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\DATE, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\DECIMAL, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\DOUBLE, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\INTEGER, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\LONG, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\NAME, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\PATH, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\REFERENCE, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\STRING, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\TYPENAME_BINARY, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\TYPENAME_BOOLEAN, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\TYPENAME_DATE, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\TYPENAME_DECIMAL, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\TYPENAME_DOUBLE, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\TYPENAME_INTEGER, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\TYPENAME_LONG, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\TYPENAME_NAME, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\TYPENAME_PATH, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\TYPENAME_REFERENCE, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\TYPENAME_STRING, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\TYPENAME_URI, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\TYPENAME_WEAKREFERENCE, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\UNDEFINED, TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\URI, and TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\WEAKREFERENCE.

◆ valueFromType()

static int TYPO3\CMS\Extbase\Persistence\Generic\PropertyType::valueFromType (   $type)
static

Member Data Documentation

◆ BINARY

const TYPO3\CMS\Extbase\Persistence\Generic\PropertyType::BINARY = 2

BINARY properties are used to store binary data.

Definition at line 56 of file PropertyType.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\nameFromValue(), and TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\valueFromName().

◆ BOOLEAN

const TYPO3\CMS\Extbase\Persistence\Generic\PropertyType::BOOLEAN = 6

◆ DATE

const TYPO3\CMS\Extbase\Persistence\Generic\PropertyType::DATE = 5

◆ DECIMAL

const TYPO3\CMS\Extbase\Persistence\Generic\PropertyType::DECIMAL = 12

The DECIMAL property type is used to store precise decimal numbers.

WE DO NOT USE THIS IN EXTBASE!

Definition at line 127 of file PropertyType.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\nameFromValue(), and TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\valueFromName().

◆ DOUBLE

const TYPO3\CMS\Extbase\Persistence\Generic\PropertyType::DOUBLE = 4

◆ INTEGER

const TYPO3\CMS\Extbase\Persistence\Generic\PropertyType::INTEGER = 13

The INTEGER property type is used to store precise decimal numbers.

WE DO NOT USE THIS IN EXTBASE!

Definition at line 134 of file PropertyType.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\nameFromValue(), TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\valueFromName(), and TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\valueFromType().

◆ LONG

const TYPO3\CMS\Extbase\Persistence\Generic\PropertyType::LONG = 3

◆ NAME

const TYPO3\CMS\Extbase\Persistence\Generic\PropertyType::NAME = 7

A NAME is a pairing of a namespace and a local name. When read, the namespace is mapped to the current prefix.

WE DO NOT USE THIS IN EXTBASE!

Definition at line 84 of file PropertyType.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\nameFromValue(), and TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\valueFromName().

◆ PATH

const TYPO3\CMS\Extbase\Persistence\Generic\PropertyType::PATH = 8

A PATH property is an ordered list of path elements. A path element is a NAME with an optional index. When read, the NAMEs within the path are mapped to their current prefix. A path may be absolute or relative.

WE DO NOT USE THIS IN EXTBASE!

Definition at line 93 of file PropertyType.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\nameFromValue(), and TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\valueFromName().

◆ REFERENCE

const TYPO3\CMS\Extbase\Persistence\Generic\PropertyType::REFERENCE = 9

A REFERENCE property stores the identifier of a referenceable node (one having type mix:referenceable), which must exist within the same workspace or session as the REFERENCE property. A REFERENCE property enforces this referential integrity by preventing the removal of its target node.

Definition at line 102 of file PropertyType.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\nameFromValue(), and TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\valueFromName().

◆ STRING

const TYPO3\CMS\Extbase\Persistence\Generic\PropertyType::STRING = 1

◆ TYPENAME_BINARY

const TYPO3\CMS\Extbase\Persistence\Generic\PropertyType::TYPENAME_BINARY = 'Binary'

String constant for type name as used in serialization.

Definition at line 149 of file PropertyType.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\nameFromValue(), and TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\valueFromName().

◆ TYPENAME_BOOLEAN

const TYPO3\CMS\Extbase\Persistence\Generic\PropertyType::TYPENAME_BOOLEAN = 'Boolean'

String constant for type name as used in serialization.

Definition at line 169 of file PropertyType.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\nameFromValue(), and TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\valueFromName().

◆ TYPENAME_DATE

const TYPO3\CMS\Extbase\Persistence\Generic\PropertyType::TYPENAME_DATE = 'Date'

String constant for type name as used in serialization.

Definition at line 164 of file PropertyType.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\nameFromValue(), and TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\valueFromName().

◆ TYPENAME_DECIMAL

const TYPO3\CMS\Extbase\Persistence\Generic\PropertyType::TYPENAME_DECIMAL = 'Decimal'

String constant for type name as used in serialization.

Definition at line 199 of file PropertyType.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\nameFromValue(), and TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\valueFromName().

◆ TYPENAME_DOUBLE

const TYPO3\CMS\Extbase\Persistence\Generic\PropertyType::TYPENAME_DOUBLE = 'Double'

String constant for type name as used in serialization.

Definition at line 159 of file PropertyType.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\nameFromValue(), and TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\valueFromName().

◆ TYPENAME_INTEGER

const TYPO3\CMS\Extbase\Persistence\Generic\PropertyType::TYPENAME_INTEGER = 'Integer'

String constant for type name as used in serialization.

Definition at line 204 of file PropertyType.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\nameFromValue(), and TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\valueFromName().

◆ TYPENAME_LONG

const TYPO3\CMS\Extbase\Persistence\Generic\PropertyType::TYPENAME_LONG = 'Long'

String constant for type name as used in serialization.

Definition at line 154 of file PropertyType.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\nameFromValue(), and TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\valueFromName().

◆ TYPENAME_NAME

const TYPO3\CMS\Extbase\Persistence\Generic\PropertyType::TYPENAME_NAME = 'Name'

String constant for type name as used in serialization.

Definition at line 174 of file PropertyType.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\nameFromValue(), and TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\valueFromName().

◆ TYPENAME_PATH

const TYPO3\CMS\Extbase\Persistence\Generic\PropertyType::TYPENAME_PATH = 'Path'

String constant for type name as used in serialization.

Definition at line 179 of file PropertyType.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\nameFromValue(), and TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\valueFromName().

◆ TYPENAME_REFERENCE

const TYPO3\CMS\Extbase\Persistence\Generic\PropertyType::TYPENAME_REFERENCE = 'Reference'

String constant for type name as used in serialization.

Definition at line 184 of file PropertyType.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\nameFromValue(), and TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\valueFromName().

◆ TYPENAME_STRING

const TYPO3\CMS\Extbase\Persistence\Generic\PropertyType::TYPENAME_STRING = 'String'

String constant for type name as used in serialization.

Definition at line 144 of file PropertyType.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\nameFromValue(), and TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\valueFromName().

◆ TYPENAME_UNDEFINED

const TYPO3\CMS\Extbase\Persistence\Generic\PropertyType::TYPENAME_UNDEFINED = 'undefined'

String constant for type name as used in serialization.

Definition at line 139 of file PropertyType.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\nameFromValue().

◆ TYPENAME_URI

const TYPO3\CMS\Extbase\Persistence\Generic\PropertyType::TYPENAME_URI = 'URI'

String constant for type name as used in serialization.

Definition at line 194 of file PropertyType.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\nameFromValue(), and TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\valueFromName().

◆ TYPENAME_WEAKREFERENCE

const TYPO3\CMS\Extbase\Persistence\Generic\PropertyType::TYPENAME_WEAKREFERENCE = 'WeakReference'

String constant for type name as used in serialization.

Definition at line 189 of file PropertyType.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\nameFromValue(), and TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\valueFromName().

◆ UNDEFINED

const TYPO3\CMS\Extbase\Persistence\Generic\PropertyType::UNDEFINED = 0

This constant can be used within a property definition to specify that the property in question may be of any type. However, it cannot be the actual type of any property instance. For example, it will never be returned by Property::getType and it cannot be assigned as the type when creating a new property.

Definition at line 46 of file PropertyType.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\valueFromName(), and TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\valueFromType().

◆ URI

const TYPO3\CMS\Extbase\Persistence\Generic\PropertyType::URI = 11

A URI property is identical to STRING property except that it only accepts values that conform to the syntax of a URI-reference as defined in RFC 3986.

WE DO NOT USE THIS IN EXTBASE!

Definition at line 120 of file PropertyType.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\nameFromValue(), and TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\valueFromName().

◆ WEAKREFERENCE

const TYPO3\CMS\Extbase\Persistence\Generic\PropertyType::WEAKREFERENCE = 10

A WEAKREFERENCE property stores the identifier of a referenceable node (one having type mix:referenceable). A WEAKREFERENCE property does not enforce referential integrity.

WE DO NOT USE THIS IN EXTBASE!

Definition at line 111 of file PropertyType.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\nameFromValue(), and TYPO3\CMS\Extbase\Persistence\Generic\PropertyType\valueFromName().