GNU GPL v2+
- Since
- 3.0
- Author
- mwjames
◆ __construct()
SMW\SQLStore\EntityStore\IdChanger::__construct |
( |
SQLStore |
$store, |
|
|
JobFactory |
$jobFactory = null |
|
) |
| |
- Since
- 3.0
- Parameters
-
SQLStore | $store | |
JobFactory | null | $jobFactory | |
◆ change()
SMW\SQLStore\EntityStore\IdChanger::change |
( |
|
$old_id, |
|
|
|
$new_id, |
|
|
|
$old_ns = -1 , |
|
|
|
$new_ns = -1 , |
|
|
|
$s_data = true , |
|
|
|
$po_data = true |
|
) |
| |
Change an SMW page id across all relevant tables. The redirect table is also updated (without much effect if the change happended due to some redirect, since the table should not contain the id of the redirected page). If namespaces are given, then they are used to delete any entries that are limited to one particular namespace (e.g. only properties can be used as properties) instead of moving them.
The id in the SMW IDs table is not touched.
- Note
- This method only changes internal page IDs in SMW. It does not assume any change in (title-related) data, as e.g. in a page move. Internal objects (subobject) do not need to be updated since they refer to the title of their parent page, not to its ID.
- Since
- 1.8
- Parameters
-
integer | $old_id | numeric ID that is to be changed |
integer | $new_id | numeric ID to which the records are to be changed |
integer | $old_ns | namespace of old id's page (-1 to ignore it) |
integer | $new_ns | namespace of new id's page (-1 to ignore it) |
boolean | $s_data | stating whether to update subject references |
boolean | $po_data | stating if to update property/object references |
◆ move()
SMW\SQLStore\EntityStore\IdChanger::move |
( |
|
$curid, |
|
|
|
$targetid = 0 |
|
) |
| |
Change an internal id to another value. If no target value is given, the value is changed to become the last id entry (based on the automatic id increment of the database). Whatever currently occupies this id will be moved consistently in all relevant tables. Whatever currently occupies the target id will be ignored (it should be ensured that nothing is moved to an id that is still in use somewhere).
- Since
- 3.1
- Parameters
-
integer | $curid | |
integer | $targetid | |
- Returns
The documentation for this class was generated from the following file: