MediaWiki master
|
Maintenance script that generates a sitemap for the site. More...
Inherits Maintenance.
Public Member Functions | |
__construct () | |
execute () | |
Execute. | |
main () | |
Main loop. | |
Public Attributes | |
bool | $compress |
Whether or not to use compression. | |
IDatabase | $dbr |
A database replica DB object. | |
resource false | $file |
A resource pointing to a sitemap file. | |
resource | $findex |
A resource pointing to the sitemap index file. | |
string | $fspath |
The path to prepend to the filename. | |
array | $limit = [] |
The number of entries to save in each sitemap file. | |
array | $namespaces = [] |
A one-dimensional array of namespaces in the wiki. | |
array | $priorities = [] |
Key => value entries of namespaces and their priorities. | |
int | $size_limit |
The maximum size of a sitemap file. | |
bool | $skipRedirects |
Whether or not to include redirection pages. | |
string | $timestamp |
When this sitemap batch was generated. | |
int | $url_limit |
The maximum amount of urls in a sitemap file. | |
string | $urlpath |
The URL path to prepend to filenames in the index; should resolve to the same directory as $fspath. | |
Maintenance script that generates a sitemap for the site.
Definition at line 44 of file generateSitemap.php.
GenerateSitemap::__construct | ( | ) |
Definition at line 151 of file generateSitemap.php.
GenerateSitemap::execute | ( | ) |
Execute.
Definition at line 191 of file generateSitemap.php.
References $fspath, main(), wfMkdirParents(), wfTimestamp(), and wfTimestampNow().
GenerateSitemap::main | ( | ) |
Main loop.
Definition at line 335 of file generateSitemap.php.
References PROTO_CANONICAL, and wfTimestamp().
Referenced by execute().
bool GenerateSitemap::$compress |
Whether or not to use compression.
Definition at line 86 of file generateSitemap.php.
IDatabase GenerateSitemap::$dbr |
A database replica DB object.
Definition at line 128 of file generateSitemap.php.
resource false GenerateSitemap::$file |
A resource pointing to a sitemap file.
Definition at line 142 of file generateSitemap.php.
resource GenerateSitemap::$findex |
A resource pointing to the sitemap index file.
Definition at line 135 of file generateSitemap.php.
string GenerateSitemap::$fspath |
The path to prepend to the filename.
Definition at line 71 of file generateSitemap.php.
Referenced by execute().
array GenerateSitemap::$limit = [] |
The number of entries to save in each sitemap file.
Definition at line 100 of file generateSitemap.php.
array GenerateSitemap::$namespaces = [] |
A one-dimensional array of namespaces in the wiki.
Definition at line 114 of file generateSitemap.php.
array GenerateSitemap::$priorities = [] |
Key => value entries of namespaces and their priorities.
Definition at line 107 of file generateSitemap.php.
int GenerateSitemap::$size_limit |
The maximum size of a sitemap file.
http://www.sitemaps.org/faq.php#faq_sitemap_size
Definition at line 64 of file generateSitemap.php.
bool GenerateSitemap::$skipRedirects |
Whether or not to include redirection pages.
Definition at line 93 of file generateSitemap.php.
string GenerateSitemap::$timestamp |
When this sitemap batch was generated.
Definition at line 121 of file generateSitemap.php.
int GenerateSitemap::$url_limit |
The maximum amount of urls in a sitemap file.
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd
Definition at line 55 of file generateSitemap.php.
string GenerateSitemap::$urlpath |
The URL path to prepend to filenames in the index; should resolve to the same directory as $fspath.
Definition at line 79 of file generateSitemap.php.