28require_once __DIR__ .
'/../Maintenance.php';
39 parent::__construct();
40 $this->
addArg(
'rev-id',
'Revision ID',
true );
44 $id = (int)$this->
getArg( 0 );
47 $rev = $lookup->getRevisionById( $id );
52 $content = $rev->getContent( SlotRecord::MAIN );
58 $slot = $rev->getSlot( SlotRecord::MAIN );
59 $text = $blobStore->getBlob( $slot->getAddress() );
61 $this->
output(
"Text length: " . strlen( $text ) .
"\n" );
62 $this->
output( substr( $text, 0, 100 ) .
"\n" );
68require_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.