Semantic MediaWiki and related extensions
|
Static Public Member Functions | |
static | newFromSemanticData (SemanticData $semanticData, SQLStore $store) |
Protected Member Functions | |
unstubProperties () | |
unstubProperty ( $propertyKey, $diProperty=null) | |
isRedirect () | |
Protected Attributes | |
$store | |
$mStubPropVals = [] | |
$mSubject | |
Protected Attributes inherited from SMW\SemanticData | |
$mPropVals = [] | |
$mProperties = [] | |
$mHasVisibleProps = false | |
$mHasVisibleSpecs = false | |
$mNoDuplicates | |
$mSubject | |
$subSemanticData | |
$errors = [] | |
$options | |
$extensionData = [] | |
$sequenceMap = [] | |
$countMap = [] | |
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 | |
Static Protected Attributes inherited from SMW\SemanticData | |
static | $mPropertyPrefix = '' |
This class provides a subclass of SemanticData that can store prefetched values from the SQL store, and unstub this data on demand when it is accessed.
GNU GPL v2+
SMW\SQLStore\EntityStore\StubSemanticData::__construct | ( | DIWikiPage | $subject, |
SQLStore | $store, | ||
$noDuplicates = true |
|||
) |
DIWikiPage | $subject | to which this data refers |
SQLStore | $store | (the parent store) |
boolean | $noDuplicates | stating if duplicate data should be avoided |
SMW\SQLStore\EntityStore\StubSemanticData::__sleep | ( | ) |
Required to support php-serialization
SMW\SQLStore\EntityStore\StubSemanticData::__wakeup | ( | ) |
SMW\SQLStore\EntityStore\StubSemanticData::addPropertyStubValue | ( | $propertyKey, | |
$valueKeys | |||
) |
Add data in abbreviated form so that it is only expanded if needed. The property key is the DB key (string) of a property value, whereas valuekeys is an array of DBkeys for the added value that will be used to initialize the value if needed at some point. If there is only one valuekey, a single string can be used.
string | $propertyKey | |
array | string | $valueKeys |
SMW\SQLStore\EntityStore\StubSemanticData::clear | ( | ) |
Delete all data other than the subject.
SMW\SQLStore\EntityStore\StubSemanticData::findSubSemanticData | ( | $subobjectName | ) |
SMW\SQLStore\EntityStore\StubSemanticData::getProperties | ( | ) |
Get the array of all properties that have stored values.
SMW\SQLStore\EntityStore\StubSemanticData::getPropertyValues | ( | DIProperty | $property | ) |
Get the array of all stored values for some property.
DIProperty | $property |
SMW\SQLStore\EntityStore\StubSemanticData::getSubSemanticData | ( | ) |
SMW\SQLStore\EntityStore\StubSemanticData::hasProperty | ( | DIProperty | $property | ) |
SMW\SQLStore\EntityStore\StubSemanticData::hasSubSemanticData | ( | $subobjectName = null | ) |
SMW\SQLStore\EntityStore\StubSemanticData::hasVisibleProperties | ( | ) |
Return true if there are any visible properties.
SMW\SQLStore\EntityStore\StubSemanticData::hasVisibleSpecialProperties | ( | ) |
Return true if there are any special properties that can be displayed.
SMW\SQLStore\EntityStore\StubSemanticData::isStub | ( | ) |
|
static |
Create a new StubSemanticData object that holds the data of a given SemanticData object. Array assignments create copies in PHP so the arrays are distinct in input and output object. The object references are copied as references in a shallow way. This is sufficient as the data items used there are immutable.
$semanticData | SemanticData | |
SQLStore | $store |
SMW\SQLStore\EntityStore\StubSemanticData::removePropertyObjectValue | ( | DIProperty | $property, |
DataItem | $dataItem | ||
) |
Remove a value for a property identified by its DataItem object. This method removes a property-value specified by the property and dataitem. If there are no more property-values for this property it also removes the property from the mProperties.
$property | SMWDIProperty |
$dataItem | DataItem |
SMW\SQLStore\EntityStore\StubSemanticData::setCountMap | ( | $sid, | |
$countMap | |||
) |
integer | $sid | |
[] | $countMap |
SMW\SQLStore\EntityStore\StubSemanticData::setSequenceMap | ( | $sid, | |
$sequenceMap | |||
) |
integer | $sid | |
[] | $sequenceMap |
|
protected |
Process all mProperties that have been added as stubs. Associated data may remain in stub form.
|
protected |
Unstub a single property from the stub data array. If available, an existing object for that property might be provided, so we do not need to make a new one. It is not checked if the object matches the property name.
string | $propertyKey | |
SMWDIProperty | $diProperty | if available |
DataItemException | if property key is not valid and $diProperty is null |