File_Sitemap
[ class tree: File_Sitemap ] [ index: File_Sitemap ] [ all elements ]

Class: File_Sitemap

Source Location: /File_Sitemap-0.1.4/File/Sitemap.php

Class Overview

File_Sitemap_Base
   |
   --File_Sitemap

Generate sitemap files. See http://www.sitemaps.org/protocol.php for more details.


Author(s):

Version:

  • Release: @package_version@

Methods


Child classes:

Sitemap_Example
Generate sitemap files. See http://www.sitemaps.org/protocol.php for more details.

Inherited Variables

Inherited Methods

Class: File_Sitemap_Base

File_Sitemap_Base::__construct()
Constructor. Build an empty XML document, with xmlns and root element.
File_Sitemap_Base::findLoc()
Returns the DOMNode element which contains $url, or false if not found.
File_Sitemap_Base::load()
Load sitemap from file. The file can be gzipped or not.
File_Sitemap_Base::notify()
Notify $site that a sitemap was updated at $url
File_Sitemap_Base::parseDateTime()
Ensure that $datetime is a valid date time string
File_Sitemap_Base::parseURL()
Ensure url contains valid chars and isn't longer than 2048 chars.
File_Sitemap_Base::remove()
Remove DOMNode that contains url $loc from the document.
File_Sitemap_Base::save()
Save sitemap to file.
File_Sitemap_Base::test()
Test that all url in sitemap are valid URL
File_Sitemap_Base::updateNode()
Set to $nodeValue the value of the $nodeName child of $urlNode.
File_Sitemap_Base::validate()
Validate the sitemap document against DTD

Class Details

[line 55]
Generate sitemap files. See http://www.sitemaps.org/protocol.php for more details.


[ Top ]


Method Detail

__construct (Constructor)   [line 66]

void __construct( )

Constructor. Build an empty XML document, with xmlns and root element.
  • Access: public

Overrides File_Sitemap_Base::__construct() (Constructor. Build an empty XML document, with xmlns and root element.)
[ Top ]

add   [line 85]

void add( mixed $loc, [float $priority = 0.5], [string $changefreq = null], [string $lastmod = null])

Add or update a location in current sitemap
  • Access: public

Parameters:

mixed   $loc   —  string | array. URL (or array of URL). Must contains protocol (http://) and trailling slash.
float   $priority   —  A number between 0.0 and 1.0 describing relative priority. Default: 0.5
string   $changefreq   —  Optional. Must be 'always', 'houly', 'daily', 'weekly', 'monthly', 'yearly' or 'never'.
string   $lastmod   —  Optional. Date (and time) of last page modification.

[ Top ]

parseChangefreq   [line 164]

string parseChangefreq( string $changefreq)

Ensure that $changefreq parameter is valid.

Parameters:

string   $changefreq   —  A valid changefreq parameter: always, hourly, daily, weekly, monthly, yearly or never.

[ Top ]

parsePriority   [line 134]

string parsePriority( float $priority)

Ensure that priority is a number between 0.0 and 1.0

Parameters:

float   $priority   —  A number between 0.0 and 1.0

[ Top ]

validate   [line 194]

boolean validate( )

Validate sitemap against its schema definition.
  • Access: public

Overrides File_Sitemap_Base::validate() (Validate the sitemap document against DTD)
[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:46:43 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.