14require_once __DIR__ .
'/../Maintenance.php';
25 parent::__construct();
26 $this->
addArg(
'rev-id',
'Revision ID',
true );
30 $id = (int)$this->
getArg( 0 );
33 $rev = $lookup->getRevisionById( $id );
38 $content = $rev->getContent( SlotRecord::MAIN );
44 $slot = $rev->getSlot( SlotRecord::MAIN );
45 $text = $blobStore->getBlob( $slot->getAddress() );
47 $this->
output(
"Text length: " . strlen( $text ) .
"\n" );
48 $this->
output( substr( $text, 0, 100 ) .
"\n" );
54require_once RUN_MAINTENANCE_IF_MAIN;
Maintenance script that gets the text of a revision, resolving external storage if needed.
execute()
Do the actual work.
__construct()
Default constructor.
Abstract maintenance class for quickly writing and churning out maintenance scripts with minimal effo...
addArg( $arg, $description, $required=true, $multi=false)
Add some args that are needed.
getArg( $argId=0, $default=null)
Get an argument.
output( $out, $channel=null)
Throw some output to the user.
fatalError( $msg, $exitCode=1)
Output a message and terminate the current script.
getServiceContainer()
Returns the main service container.