Semantic MediaWiki and related extensions
Public Member Functions | Protected Member Functions | List of all members
SMW\MediaWiki\Jobs\RefreshJob Class Reference
Collaboration diagram for SMW\MediaWiki\Jobs\RefreshJob:
Collaboration graph
[legend]

Public Member Functions

 __construct ($title, $params=array( 'spos'=> 1, 'prog'=> 0, 'rc'=> 1))
 
 run ()
 
 getProgress ()
 
- Public Member Functions inherited from SMW\MediaWiki\Jobs\JobBase
 setStore (Store $store)
 
 isEnabledJobQueue ($enableJobQueue=true)
 
 pushToJobQueue ()
 
 getType ()
 
 getJobCount ()
 
 getTitle ()
 
 hasParameter ($key)
 
 getParameter ($key)
 
 insert ()
 
 lazyPush ()
 

Protected Member Functions

 refreshData ($spos)
 
 createNextJob (array $parameters)
 
 getNamespace ($run)
 

Additional Inherited Members

- Static Public Member Functions inherited from SMW\MediaWiki\Jobs\JobBase
static batchInsert ($jobs)
 
static getQueueSizes ()
 
- Protected Attributes inherited from SMW\MediaWiki\Jobs\JobBase
 $isEnabledJobQueue = true
 
 $jobs = array()
 
 $store = null
 

Detailed Description

RefreshJob iterates over all page ids of the wiki, to perform an update action for all of them in sequence. This corresponds to the in-wiki version of the SMW_refreshData.php script for updating the whole wiki.

Note
This class ignores $smwgEnableUpdateJobs and always creates updates. In fact, it might be needed specifically on wikis that do not use update jobs in normal operation.

GNU GPL v2+

Since
1.9
Author
Markus Krötzsch
mwjames

Constructor & Destructor Documentation

SMW\MediaWiki\Jobs\RefreshJob::__construct (   $title,
  $params = array( 'spos' => 1, 'prog' => 0, 'rc' => 1 ) 
)

Constructor. The parameters optionally specified in the second argument of this constructor use the following array keys:

  • 'spos' : (start index, default 1),
  • 'prog' : (progress indicator, default 0),
  • 'rc' : (number of runs to be done, default 1)

If more than one run is done, then the first run will restrict to properties and types. The progress indication refers to the current run, not to the overall job.

Parameters
Title$title
array$params

Member Function Documentation

SMW\MediaWiki\Jobs\RefreshJob::createNextJob ( array  $parameters)
protected
SMW\MediaWiki\Jobs\RefreshJob::getNamespace (   $run)
protected
SMW\MediaWiki\Jobs\RefreshJob::getProgress ( )

Report the estimated progress status of this job as a number between 0 and 1 (0% to 100%). The progress refers to the state before processing this job.

Returns
double
SMW\MediaWiki\Jobs\RefreshJob::refreshData (   $spos)
protected
Parameters
$sposstart index
SMW\MediaWiki\Jobs\RefreshJob::run ( )
See also
Job::run
Returns
boolean

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