本文整理汇总了PHP中Maintenance::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Maintenance::__construct方法的具体用法?PHP Maintenance::__construct怎么用?PHP Maintenance::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Maintenance
的用法示例。
在下文中一共展示了Maintenance::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
parent::__construct();
$this->mDescription = "Flag videos which are deleted on provider, private, or have some form of error returned from API";
$this->addOption('test', 'Test mode; make no changes', false, false, 't');
$this->addOption('verbose', 'Show extra debugging output', false, false, 'v');
}
示例2:
function __construct()
{
parent::__construct();
$this->mDescription = 'Script to fix bug 20757 assuming that blob_tracking is intact';
$this->addOption('dry-run', 'Report only');
$this->addOption('start', 'old_id to start at', false, true);
}
示例3: __construct
public function __construct()
{
parent::__construct();
$this->mDescription = "Count of the number of articles and update the site statistics table";
$this->addOption('update', 'Update the site_stats table with the new count');
$this->addOption('use-master', 'Count using the master database');
}
示例4: fopen
function __construct()
{
parent::__construct();
$gz = in_array('compress.zlib', stream_get_wrappers()) ? 'ok' : '(disabled; requires PHP zlib module)';
$bz2 = in_array('compress.bzip2', stream_get_wrappers()) ? 'ok' : '(disabled; requires PHP bzip2 module)';
$this->mDescription = <<<TEXT
This script reads pages from an XML file as produced from Special:Export or
dumpBackup.php, and saves them into the current wiki.
Compressed XML files may be read directly:
.gz {$gz}
.bz2 {$bz2}
.7z (if 7za executable is in PATH)
Note that for very large data sets, importDump.php may be slow; there are
alternate methods which can be much faster for full site restoration:
<https://www.mediawiki.org/wiki/Manual:Importing_XML_dumps>
TEXT;
$this->stderr = fopen("php://stderr", "wt");
$this->addOption('report', 'Report position and speed after every n pages processed', false, true);
$this->addOption('namespaces', 'Import only the pages from namespaces belonging to the list of ' . 'pipe-separated namespace names or namespace indexes', false, true);
$this->addOption('dry-run', 'Parse dump without actually importing pages');
$this->addOption('debug', 'Output extra verbose debug information');
$this->addOption('uploads', 'Process file upload data if included (experimental)');
$this->addOption('no-updates', 'Disable link table updates. Is faster but leaves the wiki in an inconsistent state');
$this->addOption('image-base-path', 'Import files from a specified path', false, true);
$this->addArg('file', 'Dump file to import [else use stdin]', false);
}
示例5: __construct
public function __construct()
{
parent::__construct();
$this->addDescription('Parse random pages and compare output to cache.');
$this->addOption('namespace', 'Page namespace number', true, true);
$this->addOption('maxpages', 'Number of pages to try', true, true);
}
示例6: __construct
public function __construct()
{
parent::__construct();
$this->addOption('outfile', 'File for output. Only a single file may be specified for input.', false, true);
$this->addOption('outdir', "Directory for output. If this is not specified, and neither is --outfile, then the\n" . "output files will be sent to the same directories as the input files.", false, true);
$this->mDescription = "Minify a file or set of files.\n\n" . "If --outfile is not specified, then the output file names will have a .min extension\n" . "added, e.g. jquery.js -> jquery.min.js.";
}
示例7:
function __construct()
{
parent::__construct();
$this->addArg('path', 'The file name to format', false);
$this->addOption('outfile', 'The output file name', false, true);
$this->addOption('html', 'Use HTML output format. By default, wikitext is used.');
}
示例8: __construct
public function __construct()
{
parent::__construct();
$this->mDescription = "Review all pages in reviewable namespaces. " . "A user ID must be given to specifiy the \"reviewer\" who accepted the pages.";
$this->addOption('username', 'The user name of the existing user to use as the "reviewer"', true, true);
$this->setBatchSize(100);
}
示例9: __construct
public function __construct() {
parent::__construct();
global $wgCategoryCollation;
$this->mDescription = <<<TEXT
This script will find all rows in the categorylinks table whose collation is
out-of-date (cl_collation != '$wgCategoryCollation') and repopulate cl_sortkey
using the page title and cl_sortkey_prefix. If everything's collation is
up-to-date, it will do nothing.
TEXT;
$this->addOption( 'force', 'Run on all rows, even if the collation is ' .
'supposed to be up-to-date.' );
$this->addOption( 'previous-collation', 'Set the previous value of ' .
'$wgCategoryCollation here to speed up this script, especially if your ' .
'categorylinks table is large. This will only update rows with that ' .
'collation, though, so it may miss out-of-date rows with a different, ' .
'even older collation.', false, true );
$this->addOption( 'target-collation', 'Set this to the new collation type to ' .
'use instead of $wgCategoryCollation. Usually you should not use this, ' .
'you should just update $wgCategoryCollation in LocalSettings.php.',
false, true );
$this->addOption( 'dry-run', 'Don\'t actually change the collations, just ' .
'compile statistics.' );
$this->addOption( 'verbose-stats', 'Show more statistics.' );
}
示例10: __construct
/**
* Set script options
*/
public function __construct()
{
parent::__construct();
$this->addOption('debug', 'Show a lot of debugging stuff.');
$this->addOption('local', 'Read files from local file system (uses: /raid/images/by_id/).');
$this->mDescription = 'Calculate md5 checksums for images';
}
示例11: __construct
public function __construct()
{
parent::__construct();
$this->addOption('list', 'List special page names');
$this->addOption('only', 'Only update "page"; case sensitive, ' . 'check correct case by calling this script with --list or on ' . 'includes/QueryPage.php. Ex: --only=BrokenRedirects', false, true);
$this->addOption('override', 'Also update pages that have updates disabled');
}
示例12: __construct
public function __construct()
{
parent::__construct();
$this->addOption('delete', 'Actually delete the account');
$this->addOption('ignore-groups', 'List of comma-separated groups to exclude', false, true);
$this->addOption('ignore-touched', 'Skip accounts touched in last N days', false, true);
}
示例13: administrator
function __construct()
{
parent::__construct();
global $IP;
$this->addArg('name', 'The name of the wiki', true);
$this->addArg('admin', 'The username of the wiki administrator (WikiSysop)', true);
$this->addOption('pass', 'The password for the wiki administrator.', false, true);
$this->addOption('passfile', 'An alternative way to provide pass option, as the contents of this file', false, true);
/* $this->addOption( 'email', 'The email for the wiki administrator', false, true ); */
$this->addOption('scriptpath', 'The relative path of the wiki in the web server (/wiki)', false, true);
$this->addOption('lang', 'The language to use (en)', false, true);
/* $this->addOption( 'cont-lang', 'The content language (en)', false, true ); */
$this->addOption('dbtype', 'The type of database (mysql)', false, true);
$this->addOption('dbserver', 'The database host (localhost)', false, true);
$this->addOption('dbport', 'The database port; only for PostgreSQL (5432)', false, true);
$this->addOption('dbname', 'The database name (my_wiki)', false, true);
$this->addOption('dbpath', 'The path for the SQLite DB (/var/data)', false, true);
$this->addOption('dbprefix', 'Optional database table name prefix', false, true);
$this->addOption('installdbuser', 'The user to use for installing (root)', false, true);
$this->addOption('installdbpass', 'The pasword for the DB user to install as.', false, true);
$this->addOption('dbuser', 'The user to use for normal operations (wikiuser)', false, true);
$this->addOption('dbpass', 'The pasword for the DB user for normal operations', false, true);
$this->addOption('dbpassfile', 'An alternative way to provide dbpass option, as the contents of this file', false, true);
$this->addOption('confpath', "Path to write LocalSettings.php to, default {$IP}", false, true);
/* $this->addOption( 'dbschema', 'The schema for the MediaWiki DB in pg (mediawiki)', false, true ); */
/* $this->addOption( 'namespace', 'The project namespace (same as the name)', false, true ); */
$this->addOption('env-checks', "Run environment checks only, don't change anything");
}
示例14:
function __construct()
{
parent::__construct();
$this->mDescription = "Rebuilds titlekey table entries for all pages in DB.";
$this->setBatchSize(1000);
$this->addOption('start', 'Page ID to start from', false, true);
}
示例15: __construct
public function __construct()
{
parent::__construct();
$this->addOption('start-page', 'page_id of the page to start with');
$this->addOption('start-image', 'il_to of the image to start with');
$this->addOption('maxlag', 'Maximum replication lag', false, true);
}