Semantic MediaWiki and related extensions
|
Public Member Functions | |
__construct (EntityLookup $entityLookup, RedirectTargetLookup $redirectTargetLookup, BlobStore $blobStore) | |
setCachedLookupFeatures ($valueLookupFeatures) | |
canUseValueLookupFeature ($valueLookupFeature) | |
getSemanticData (DIWikiPage $subject, $filter=false) | |
getProperties (DIWikiPage $subject, RequestOptions $requestOptions=null) | |
getPropertyValues (DIWikiPage $subject=null, DIProperty $property, RequestOptions $requestOptions=null) | |
getPropertySubjects (DIProperty $property, DataItem $dataItem=null, RequestOptions $requestOptions=null) | |
getAllPropertySubjects (DIProperty $property, RequestOptions $requestOptions=null) | |
getInProperties (DataItem $object, RequestOptions $requestOptions=null) | |
resetCacheBy (DIWikiPage $subject=null) | |
Public Attributes | |
const | VERSION = '1.1' |
Intermediary (fast) access to serialized blob values to avoid DB access on objects that are static until it is altered. An intermediary object will invalidate itself on any delete, update, change, or move operation.
Each subject (including its subobjects) will be stored as individual blob with each operation belonging to that subject extending its blob to be able to discard the entire entity at once.
Each operation request will either fill the cache or return the result from the cache until the subject is changed and the whole container is being flushed.
The class could be decorator but due to the nature of the current Store design it is called from within each method. The class is not for public use and it is expected to be accessed only by a Store operation.
GNU GPL v2+
SMW\SQLStore\EntityStore\CachedEntityLookup::__construct | ( | EntityLookup | $entityLookup, |
RedirectTargetLookup | $redirectTargetLookup, | ||
BlobStore | $blobStore | ||
) |
EntityLookup | $entityLookup | |
RedirectTargetLookup | $redirectTargetLookup | |
BlobStore | $blobStore |
SMW\SQLStore\EntityStore\CachedEntityLookup::canUseValueLookupFeature | ( | $valueLookupFeature | ) |
integer | $valueLookupFeature |
SMW\SQLStore\EntityStore\CachedEntityLookup::getAllPropertySubjects | ( | DIProperty | $property, |
RequestOptions | $requestOptions = null |
||
) |
Get an array of all subjects that have some value for the given property. The result is an array of DIWikiPage objects.
DIProperty | $property | |
RequestOptions | null | $requestOptions |
Implements SMW\EntityLookup.
SMW\SQLStore\EntityStore\CachedEntityLookup::getInProperties | ( | DataItem | $object, |
RequestOptions | $requestOptions = null |
||
) |
Get an array of all properties for which there is some subject that relates to the given value. The result is an array of DIWikiPage objects.
DataItem | $object | |
RequestOptions | null | $requestOptions |
Implements SMW\EntityLookup.
SMW\SQLStore\EntityStore\CachedEntityLookup::getProperties | ( | DIWikiPage | $subject, |
RequestOptions | $requestOptions = null |
||
) |
Get an array of all properties for which the given subject has some value. The result is an array of DIProperty objects.
DIWikiPage | $subject | |
RequestOptions | null | $requestOptions |
Implements SMW\EntityLookup.
SMW\SQLStore\EntityStore\CachedEntityLookup::getPropertySubjects | ( | DIProperty | $property, |
DataItem | $dataItem = null , |
||
RequestOptions | $requestOptions = null |
||
) |
Get an array of all subjects that have the given value for the given property. The result is an array of DIWikiPage objects. If null is given as a value, all subjects having that property are returned.
DIWikiPage | null | $subject | |
DIProperty | $property | |
RequestOptions | null | $requestOptions |
Implements SMW\EntityLookup.
SMW\SQLStore\EntityStore\CachedEntityLookup::getPropertyValues | ( | DIWikiPage | $subject = null , |
DIProperty | $property, | ||
RequestOptions | $requestOptions = null |
||
) |
Get an array of all property values stored for the given subject and property. The result is an array of DataItem objects.If called with $subject == null, all values for the given property are returned.
DIWikiPage | null | $subject | |
DIProperty | $property | |
RequestOptions | null | $requestOptions |
Implements SMW\EntityLookup.
SMW\SQLStore\EntityStore\CachedEntityLookup::getSemanticData | ( | DIWikiPage | $subject, |
$filter = false |
|||
) |
Retrieve all data stored about the given subject and return it as a SemanticData container. There are no options: it just returns all available data as shown in the page's Factbox. $filter is an array of strings that are datatype IDs. If given, the function will avoid any work that is not necessary if only properties of these types are of interest.
DIWikiPage | $subject | |
string[]|bool | $filter |
Implements SMW\EntityLookup.
SMW\SQLStore\EntityStore\CachedEntityLookup::resetCacheBy | ( | DIWikiPage | $subject = null | ) |
Remove a cache item that appears during an alteration action (update, change, delete) to ensure that we always have the correct set of matches.
DIWikiPage | null | $subject |
Implements SMW\EntityLookup.
SMW\SQLStore\EntityStore\CachedEntityLookup::setCachedLookupFeatures | ( | $valueLookupFeatures | ) |
integer | $valueLookupFeatures |
const SMW\SQLStore\EntityStore\CachedEntityLookup::VERSION = '1.1' |
Update this version number when the serialization format changes.