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

Public Member Functions

 __construct (SQLStore $store, SQLStoreFactory $factory)
 
 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)
 

Detailed Description

GNU GPL v2+

Since
2.5
Author
mwjames

Constructor & Destructor Documentation

◆ __construct()

SMW\SQLStore\EntityStore\EntityLookup::__construct ( SQLStore  $store,
SQLStoreFactory  $factory 
)
Since
2.5
Parameters
SQLStore$store
SQLStoreFactory$factory

Member Function Documentation

◆ getAllPropertySubjects()

SMW\SQLStore\EntityStore\EntityLookup::getAllPropertySubjects ( DIProperty  $property,
RequestOptions  $requestOptions = null 
)
See also
Store::getProperties
Since
2.5

Get an array of all subjects that have some value for the given property. The result is an array of DIWikiPage objects.

Since
2.5
Parameters
DIProperty$property
RequestOptions | null$requestOptions
Returns
DIWikiPage[]|Iterator

Implements SMW\EntityLookup.

◆ getInProperties()

SMW\SQLStore\EntityStore\EntityLookup::getInProperties ( DataItem  $object,
RequestOptions  $requestOptions = null 
)
See also
Store::getInProperties
Since
2.5

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.

Note
In some stores, this function might be implemented partially so that only values of type Page (_wpg) are supported.
Since
2.5
Parameters
DataItem$object
RequestOptions | null$requestOptions
Returns
DataItem[]|[]

Implements SMW\EntityLookup.

◆ getProperties()

SMW\SQLStore\EntityStore\EntityLookup::getProperties ( DIWikiPage  $subject,
RequestOptions  $requestOptions = null 
)
See also
Store::getProperties
Since
2.5

Get an array of all properties for which the given subject has some value. The result is an array of DIProperty objects.

Since
2.5
Parameters
DIWikiPage$subject
RequestOptions | null$requestOptions
Returns
DataItem[]|[]

Implements SMW\EntityLookup.

◆ getPropertySubjects()

SMW\SQLStore\EntityStore\EntityLookup::getPropertySubjects ( DIProperty  $property,
DataItem  $dataItem = null,
RequestOptions  $requestOptions = null 
)
See also
Store::getPropertySubjects
Since
2.5

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.

Since
2.5
Parameters
DIWikiPage | null$subject
DIProperty$property
RequestOptions | null$requestOptions
Returns
DIWikiPage[]|[]|Iterator

Implements SMW\EntityLookup.

◆ getPropertyValues()

SMW\SQLStore\EntityStore\EntityLookup::getPropertyValues ( DIWikiPage  $subject = null,
DIProperty  $property,
RequestOptions  $requestOptions = null 
)
See also
Store::getPropertyValues
Since
2.5

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.

Since
2.5
Parameters
DIWikiPage | null$subject
DIProperty$property
RequestOptions | null$requestOptions
Returns
DataItem[]|[]|Iterator

Implements SMW\EntityLookup.

◆ getSemanticData()

SMW\SQLStore\EntityStore\EntityLookup::getSemanticData ( DIWikiPage  $subject,
  $filter = false 
)
See also
Store::getSemanticData
Since
2.5

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.

Note
There is no guarantee that the store does not retrieve more data than requested when a filter is used. Filtering just ensures that only necessary requests are made, i.e. it improves performance.
Since
2.5
Parameters
DIWikiPage$subject
RequestOptions|string[]|bool$filter
Returns
SemanticData

Implements SMW\EntityLookup.


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

About | General disclaimer | Privacy policy