Semantic MediaWiki and related extensions
Public Member Functions | Static Public Member Functions | List of all members
SMW\DataModel\ContainerSemanticData Class Reference
Inheritance diagram for SMW\DataModel\ContainerSemanticData:
Inheritance graph
[legend]
Collaboration diagram for SMW\DataModel\ContainerSemanticData:
Collaboration graph
[legend]

Public Member Functions

 __sleep ()
 
 skipAnonymousCheck ()
 
 hasAnonymousSubject ()
 
 getSubject ()
 
 copyDataFrom (SemanticData $semanticData=null)
 
- Public Member Functions inherited from SMW\SemanticData
 __construct (DIWikiPage $subject, $noDuplicates=true)
 
 __sleep ()
 
 getSubject ()
 
 getSequenceMap ()
 
 getProperties ()
 
 hasProperty (DIProperty $property)
 
 getPropertyValues (DIProperty $property)
 
 setExtensionData ( $key, $value)
 
 getExtensionData ( $key)
 
 getOption ( $key, $default=null)
 
 setOption ( $key, $value)
 
 getErrors ()
 
 addError ( $error)
 
 getHash ()
 
 getSubSemanticData ()
 
 clearSubSemanticData ()
 
 hasVisibleProperties ()
 
 hasVisibleSpecialProperties ()
 
 addPropertyObjectValue (DIProperty $property, SMWDataItem $dataItem)
 
 addPropertyValue ( $propertyName, SMWDataItem $dataItem)
 
 addDataValue (SMWDataValue $dataValue)
 
 addSubobject (Subobject $subobject)
 
 removePropertyObjectValue (DIProperty $property, SMWDataItem $dataItem)
 
 removeProperty (DIProperty $property)
 
 clear ()
 
 isEmpty ()
 
 importDataFrom (SemanticData $semanticData)
 
 removeDataFrom (SemanticData $semanticData)
 
 hasSubSemanticData ( $subobjectName=null)
 
 findSubSemanticData ( $subobjectName)
 
 addSubSemanticData (SemanticData $semanticData)
 
 removeSubSemanticData (SemanticData $semanticData)
 

Static Public Member Functions

static makeAnonymousContainer ( $noDuplicates=true, $skipAnonymousCheck=false)
 

Additional Inherited Members

- Public Attributes inherited from SMW\SemanticData
const OPT_LAST_MODIFIED = 'opt.last.modified'
 
const OPT_CHECK_REMNANT_ENTITIES = 'opt.check.remnant.entities'
 
const PROC_USER = 'proc.user'
 
const PROC_DELETE = 'proc.delete'
 
 $stubObject
 
 $subContainerDepthCounter = 0
 
- Protected Attributes inherited from SMW\SemanticData
 $mPropVals = []
 
 $mProperties = []
 
 $mHasVisibleProps = false
 
 $mHasVisibleSpecs = false
 
 $mNoDuplicates
 
 $mSubject
 
 $subSemanticData
 
 $subDataAllowed = true
 
 $errors = []
 
 $options
 
 $extensionData = []
 
 $sequenceMap = []
 
- Static Protected Attributes inherited from SMW\SemanticData
static $mPropertyPrefix = ''
 

Detailed Description

Subclass of SemanticData that is used to store the data in SMWDIContainer objects. It is special since the subject that the stored property-value pairs refer may or may not be specified explicitly. This can be tested with hasAnonymousSubject(). When trying to access the subject in anonymous state, an Exception will be thrown.

Anonymous container data items are used when no page context is available, e.g. when specifying such a value in a search form where the parent page is not known.

Besides this change, the subclass mainly is needed to restore the disabled serialization of SemanticData.

See also the documentation of SMWDIContainer.

GNU GPL v2+

Since
1.6
Author
Markus Krötzsch
mwjames

Member Function Documentation

◆ __sleep()

SMW\DataModel\ContainerSemanticData::__sleep ( )

Restore complete serialization which is disabled in SemanticData.

◆ copyDataFrom()

SMW\DataModel\ContainerSemanticData::copyDataFrom ( SemanticData  $semanticData = null)

Change the object to become an exact copy of the given SemanticData object. This is used to make other types of SemanticData into an SMWContainerSemanticData. To copy objects of the same type, PHP clone() should be used.

Since
1.7
Parameters
SemanticData | null$semanticData

◆ getSubject()

SMW\DataModel\ContainerSemanticData::getSubject ( )

Return subject to which the stored semantic annotation refer to, or throw an exception if the subject is anonymous (if the data has not been contextualized with setMasterPage() yet).

Returns
DIWikiPage subject
Exceptions
DataItemException

◆ hasAnonymousSubject()

SMW\DataModel\ContainerSemanticData::hasAnonymousSubject ( )

Check if the subject of this container is an anonymous object. See the documenation of the class for details.

Returns
boolean

◆ makeAnonymousContainer()

static SMW\DataModel\ContainerSemanticData::makeAnonymousContainer (   $noDuplicates = true,
  $skipAnonymousCheck = false 
)
static

Construct a data container that refers to an anonymous subject. See the documentation of the class for details.

Since
1.7
Parameters
boolean$noDuplicatesstating if duplicate data should be avoided

◆ skipAnonymousCheck()

SMW\DataModel\ContainerSemanticData::skipAnonymousCheck ( )

Skip the check as it is required for some "search pattern match" activity to temporarily to access the container without raising an exception.

Since
2.4

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

About | General disclaimer | Privacy policy