SitemapGenerator
extends BaseXmlGenerator
in package
uses
TracksExecutionTime
Defines the public API for XML generators and provides a shared codebase for common helpers.
Tags
Table of Contents
Properties
- $timeStart : float
- $xmlElement : SimpleXMLElement
Methods
- __construct() : mixed
- Create a new XML generator instance.
- generate() : $this
- Generate the XML document.
- getXml() : string
- Get the XML document as a string.
- getXmlElement() : SimpleXMLElement
- Get the XML document as a SimpleXMLElement object.
- make() : string
- Generate a new XML document and get the contents as a string.
- addChild() : SimpleXMLElement
- addRoute() : void
- constructBaseElement() : void
- escape() : string
- getExecutionTimeInMs() : int|float
- getExecutionTimeString() : string
- getFormattedProcessingTime() : numeric-string
- getLastModDate() : string
- getPriority() : string
- resolveRouteLink() : string
- startClock() : void
- stopClock() : float
Properties
$timeStart
protected
float
$timeStart
$xmlElement
protected
SimpleXMLElement
$xmlElement
Methods
__construct()
Create a new XML generator instance.
public
__construct() : mixed
generate()
Generate the XML document.
public
generate() : $this
Return values
$thisgetXml()
Get the XML document as a string.
public
getXml() : string
Return values
stringgetXmlElement()
Get the XML document as a SimpleXMLElement object.
public
getXmlElement() : SimpleXMLElement
Return values
SimpleXMLElementmake()
Generate a new XML document and get the contents as a string.
public
static make() : string
Return values
stringaddChild()
protected
addChild(SimpleXMLElement $element, string $name, string $value) : SimpleXMLElement
Parameters
- $element : SimpleXMLElement
- $name : string
- $value : string
Return values
SimpleXMLElementaddRoute()
protected
addRoute(Route $route) : void
Parameters
- $route : Route
constructBaseElement()
protected
constructBaseElement() : void
escape()
protected
escape(string $string) : string
Parameters
- $string : string
Return values
stringgetExecutionTimeInMs()
protected
getExecutionTimeInMs() : int|float
Return values
int|floatgetExecutionTimeString()
protected
getExecutionTimeString() : string
Return values
stringgetFormattedProcessingTime()
protected
getFormattedProcessingTime() : numeric-string
Return values
numeric-stringgetLastModDate()
protected
getLastModDate(string $file) : string
Parameters
- $file : string
Return values
stringgetPriority()
protected
getPriority(string $pageClass, string $slug) : string
Parameters
- $pageClass : string
- $slug : string
Return values
stringresolveRouteLink()
protected
resolveRouteLink(Route $route) : string
Parameters
- $route : Route
Return values
stringstartClock()
protected
startClock() : void
stopClock()
protected
stopClock() : float