|
| getSemanticData (DIWikiPage $subject, $filter=false) |
|
| getPropertyValues ( $subject, DIProperty $property, $requestoptions=null) |
|
| getPropertySubjects (DIProperty $property, $value, $requestoptions=null) |
|
| getAllPropertySubjects (DIProperty $property, $requestoptions=null) |
|
| getProperties (DIWikiPage $subject, $requestOptions=null) |
|
| getInProperties (DataItem $object, $requestoptions=null) |
|
| getWikiPageSortKey (DIWikiPage $dataItem) |
|
| getRedirectTarget (DataItem $dataItem) |
|
| deleteSubject (Title $subject) |
|
| updateData (SemanticData $semanticData) |
|
| clearData (DIWikiPage $di) |
|
| changeTitle (Title $oldtitle, Title $newtitle, $pageid, $redirid=0) |
|
| getQueryResult (SMWQuery $query) |
|
| getPropertiesSpecial ( $requestoptions=null) |
|
| getUnusedPropertiesSpecial ( $requestoptions=null) |
|
| getWantedPropertiesSpecial ( $requestoptions=null) |
|
| getStatistics () |
|
| service ( $service,... $args) |
|
| setup ( $verbose=true) |
|
| drop ( $verbose=true) |
|
| refreshData (&$index, $count, $namespaces=false, $usejobs=true) |
|
| getOptions () |
|
| setOption ( $key, $value) |
|
| getOption ( $key, $default=null) |
|
| clear () |
|
| getInfo ( $type=null) |
|
| setConnectionManager (ConnectionManager $connectionManager) |
|
| getConnection ( $type) |
|
| getQueryResult (Query $query) |
|
The abstract base class for all classes that implement access to some semantic store. Besides the relevant interface, this class provides default implementations for some optional methods, which inform the caller that these methods are not implemented.
- Author
- Markus Krötzsch
SMW\Store::changeTitle |
( |
Title |
$oldtitle, |
|
|
Title |
$newtitle, |
|
|
|
$pageid, |
|
|
|
$redirid = 0 |
|
) |
| |
|
abstract |
Update the store to reflect a renaming of some article. Normally this happens when moving pages in the wiki, and in this case there is also a new redirect page generated at the old position. The title objects given are only used to specify the name of the title before and after the move – do not use their IDs for anything! The ID of the moved page is given in $pageid, and the ID of the newly created redirect, if any, is given by $redirid. If no new page was created, $redirid will be 0.
SMW\Store::getPropertiesSpecial |
( |
|
$requestoptions = null | ) |
|
|
abstract |
Return all properties that have been used on pages in the wiki. The result is an array of arrays, each containing a property data item and a count. The expected order is alphabetical w.r.t. to property names.
If there is an error on creating some property object, then a suitable SMWDIError object might be returned in its place. Even if there are errors, the function should always return the number of results requested (otherwise callers might assume that there are no further results to ask for).
- Parameters
-
SMWRequestOptions | $requestoptions | |
- Returns
- ListLookup
SMW\Store::getUnusedPropertiesSpecial |
( |
|
$requestoptions = null | ) |
|
|
abstract |
Return all properties that have been declared in the wiki but that are not used on any page. Stores might restrict here to those properties that have been given a type if they have no efficient means of accessing the set of all pages in the property namespace.
If there is an error on creating some property object, then a suitable SMWDIError object might be returned in its place. Even if there are errors, the function should always return the number of results requested (otherwise callers might assume that there are no further results to ask for).
- Parameters
-
SMWRequestOptions | $requestoptions | |
- Returns
- array of DIProperty|SMWDIError
SMW\Store::refreshData |
( |
& |
$index, |
|
|
|
$count, |
|
|
|
$namespaces = false , |
|
|
|
$usejobs = true |
|
) |
| |
|
abstract |
Refresh some objects in the store, addressed by numerical ids. The meaning of the ids is private to the store, and does not need to reflect the use of IDs elsewhere (e.g. page ids). The store is to refresh $count objects starting from the given $index. Typically, updates are achieved by generating update jobs. After the operation, $index is set to the next index that should be used for continuing refreshing, or to -1 for signaling that no objects of higher index require refresh. The method returns a decimal number between 0 and 1 to indicate the overall progress of the refreshing (e.g. 0.7 if 70% of all objects were refreshed).
The optional parameter $namespaces may contain an array of namespace constants. If given, only objects from those namespaces will be refreshed. The default value FALSE disables this feature.
The optional parameter $usejobs indicates whether updates should be processed later using MediaWiki jobs, instead of doing all updates immediately. The default is TRUE.
- Parameters
-
$index | integer |
$count | integer |
$namespaces | mixed array or false |
$usejobs | boolean |
- Returns
- float between 0 and 1 to indicate the overall progress of the refreshing
SMW\Store::setup |
( |
|
$verbose = true | ) |
|
|
abstract |
Setup all storage structures properly for using the store. This function performs tasks like creation of database tables. It is called upon installation as well as on upgrade: hence it must be able to upgrade existing storage structures if needed. It should return "true" if successful and return a meaningful string error message otherwise.
The parameter $verbose determines whether the procedure is allowed to report on its progress. This is doen by just using print and possibly ob_flush/flush. This is also relevant for preventing timeouts during long operations. All output must be valid in an HTML context, but should preferably be plain text, possibly with some linebreaks and weak markup.
- Parameters
-
- Returns
- boolean Success indicator