Semantic MediaWiki and related extensions
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SMWRecordValue Class Reference
Inheritance diagram for SMWRecordValue:
Inheritance graph
[legend]
Collaboration diagram for SMWRecordValue:
Collaboration graph
[legend]

Public Member Functions

 __construct ( $typeid='')
 
 getProperties ()
 
 getValuesFromString ( $value)
 
 getShortWikiText ( $linked=null)
 
 getShortHTMLText ( $linker=null)
 
 getLongWikiText ( $linked=null)
 
 getLongHTMLText ( $linker=null)
 
 getWikiValue ()
 
 setProperty (DIProperty $property)
 
 setFieldProperties (array $properties)
 
 getDataItems ()
 
 getPropertyDataItems ()
 

Protected Member Functions

 parseUserValue ( $value)
 
 loadDataItem (DataItem $dataItem)
 
 makeOutputText ( $type=0, $linker=null)
 
 makeValueOutputText ( $type, SMWDataValue $dataValue, $linker)
 

Protected Attributes

 $m_diProperties = null
 cache for properties for the fields of this data value
 

Detailed Description

SMWDataValue implements the handling of small sets of property-value pairs. The declaration of Records in SMW uses the order of values to encode the property that should be used, so the user only needs to enter a list of values. Internally, however, the property-value assignments are not stored with a particular order; they will only be ordered for display, following the declaration. This is why it is not supported to have Records using the same property for more than one value.

The class uses DIContainer objects to return its inner state. See the documentation for DIContainer for details on how this "pseudo" data encapsulated many property assignments. Such data is stored internally like a page with various property-value assignments. Indeed, record values can be created from DIWikiPage objects (the missing information will be fetched from the store).

Todo:

Enforce limitation of maximal number of values.

Enforce uniqueness of properties in declaration.

Complete internationalisation.

Author
Markus Krötzsch

Constructor & Destructor Documentation

◆ __construct()

SMWRecordValue::__construct (   $typeid = '')
Parameters
string$typeid

Member Function Documentation

◆ getDataItems()

SMWRecordValue::getDataItems ( )
Since
1.6

◆ getProperties()

SMWRecordValue::getProperties ( )
Since
2.3
Returns
DIProperty[]|null

◆ getPropertyDataItems()

SMWRecordValue::getPropertyDataItems ( )

Return the array (list) of properties that the individual entries of this datatype consist of.

Since
1.6
Todo:
I18N for error message.
Returns
array of DIProperty

◆ getValuesFromString()

SMWRecordValue::getValuesFromString (   $value)
Since
2.3
Parameters
string$value
Returns
array

◆ loadDataItem()

SMWRecordValue::loadDataItem ( DataItem  $dataItem)
protected
See also
SMWDataValue::loadDataItem()
Parameters
$dataitemDataItem
Returns
boolean

◆ setFieldProperties()

SMWRecordValue::setFieldProperties ( array  $properties)
Since
2.1
Parameters
DIProperty[]$properties

◆ setProperty()

SMWRecordValue::setProperty ( DIProperty  $property)

Make sure that the content is reset in this case.

Todo:
This is not a full reset yet (the case that property is changed after a value was set does not occur in the normal flow of things, hence this has low priority).

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

About | General disclaimer | Privacy policy