[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/maintenance/ -> generateSitemap.php (summary)

Creates a sitemap for the site. Copyright © 2005, Ævar Arnfjörð Bjarmason, Jens Frank <[email protected]> and Brion Vibber <[email protected]>

File Size: 571 lines (14 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 1 file
 maintenance/Maintenance.php

Defines 1 class

GenerateSitemap:: (22 methods):
  __construct()
  execute()
  setNamespacePriorities()
  init_path()
  generateNamespaces()
  priority()
  guessPriority()
  getPageRes()
  main()
  open()
  write()
  close()
  sitemapFilename()
  xmlHead()
  xmlSchema()
  openIndex()
  indexEntry()
  closeIndex()
  openFile()
  fileEntry()
  closeFile()
  generateLimit()


Class: GenerateSitemap  - X-Ref

Maintenance script that generates a sitemap for the site.

__construct()   X-Ref
Constructor


execute()   X-Ref
Execute


setNamespacePriorities()   X-Ref
No description

init_path( $fspath )   X-Ref
Create directory if it does not exist and return pathname with a trailing slash

param: string $fspath
return: null|string

generateNamespaces()   X-Ref
Generate a one-dimensional array of existing namespaces


priority( $namespace )   X-Ref
Get the priority of a given namespace

param: int $namespace The namespace to get the priority for
return: string

guessPriority( $namespace )   X-Ref
If the namespace isn't listed on the priority list return the
default priority for the namespace, varies depending on whether it's
a talkpage or not.

param: int $namespace The namespace to get the priority for
return: string

getPageRes( $namespace )   X-Ref
Return a database resolution of all the pages in a given namespace

param: int $namespace Limit the query to this namespace
return: Resource

main()   X-Ref
Main loop


open( $file, $flags )   X-Ref
gzopen() / fopen() wrapper

param: string $file
param: string $flags
return: resource

write( &$handle, $str )   X-Ref
gzwrite() / fwrite() wrapper

param: resource $handle
param: string $str

close( &$handle )   X-Ref
gzclose() / fclose() wrapper

param: resource $handle

sitemapFilename( $namespace, $count )   X-Ref
Get a sitemap filename

param: int $namespace The namespace
param: int $count The count
return: string

xmlHead()   X-Ref
Return the XML required to open an XML file

return: string

xmlSchema()   X-Ref
Return the XML schema being used

return: string

openIndex()   X-Ref
Return the XML required to open a sitemap index file

return: string

indexEntry( $filename )   X-Ref
Return the XML for a single sitemap indexfile entry

param: string $filename The filename of the sitemap file
return: string

closeIndex()   X-Ref
Return the XML required to close a sitemap index file

return: string

openFile()   X-Ref
Return the XML required to open a sitemap file

return: string

fileEntry( $url, $date, $priority )   X-Ref
Return the XML for a single sitemap entry

param: string $url An RFC 2396 compliant URL
param: string $date A ISO 8601 date
param: string $priority A priority indicator, 0.0 - 1.0 inclusive with a 0.1 stepsize
return: string

closeFile()   X-Ref
Return the XML required to close sitemap file

return: string

generateLimit( $namespace )   X-Ref
Populate $this->limit

param: int $namespace



Generated: Fri Nov 28 14:03:12 2014 Cross-referenced by PHPXref 0.7.1