Documentation

SitemapIndex extends AbstractSitemap implements SitemapIndex

Interfaces, Classes and Traits

SitemapIndex

Table of Contents

END  = '</sitemapindex>'
End of sitemap.
START  = '<?xml version="1.0" encoding="UTF-8"?><sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'
Start of sitemap.
$ext  : string
Extension.
$lastMod  : Datetime
Last modify.
$file  : object
resource.
$raw  : string
XML structure.
__construct()  : void
__construct.
addItem()  : void
Add item to sitemap.
close()  : void
Close the sitemap file.
delete()  : object
Delete the sitemap.
has()  : bool
Determine whether the sitemap exists.
read()  : xml
Read the sitemap file.
write()  : void
Write on sitemap file.
appendItem()  : void
Append item to sitemap.
create()  : bool
Create the sitemap.

Constants

END

End of sitemap.

public string END = '</sitemapindex>'
Tags
since
1.0.0

START

Start of sitemap.

public string START = '<?xml version="1.0" encoding="UTF-8"?><sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'
Tags
since
1.0.0

Properties

$raw

XML structure.

private string $raw = ' <sitemap> <loc>:url</loc> <lastmod>:lastmod</lastmod> </sitemap>'
Tags
since
1.0.0

Methods

__construct()

__construct.

public __construct((string) $file) : void

Specify file name with extension, the path will be public.

Parameters
$file : (string)

File name with extension (.xml).

Tags
since
1.0.0
Return values
void

addItem()

Add item to sitemap.

public addItem((string) $url[, (string) $lastMod = null ]) : void
Parameters
$url : (string)

Valid url.

$lastMod : (string) = null

Last modify.

Tags
since
1.0.0
Return values
void

close()

Close the sitemap file.

public close() : void
Tags
since
1.0.0
Return values
void

delete()

Delete the sitemap.

public delete((string) $file) : object
Parameters
$file : (string)

File name with extension (.xml).

Tags
since
1.0.0
Return values
object

has()

Determine whether the sitemap exists.

public has((string) $file) : bool
Parameters
$file : (string)

File name with extension (.xml).

Tags
since
1.0.0
Return values
bool

read()

Read the sitemap file.

public read() : xml
Tags
since
1.0.0
Return values
xml

write()

Write on sitemap file.

public write((\alphaz\Common\Sitemap\xml) $data) : void
Parameters
$data : (\alphaz\Common\Sitemap\xml)

Valid XML

Tags
since
1.0.0
Return values
void

appendItem()

Append item to sitemap.

private appendItem((string) $url, (string) $lastMod) : void
Parameters
$url : (string)

Valid url.

$lastMod : (string)

Last modify.

Tags
since
1.0.0
Return values
void

create()

Create the sitemap.

private create((\alphaz\Common\Sitemap\siring) $mode, (string) $url[, (string) $lastMod = null ]) : bool
Parameters
$mode : (\alphaz\Common\Sitemap\siring)

Valid mode (for only access inside class)

$url : (string)

Valid url.

$lastMod : (string) = null

Last modify.

Tags
since
1.0.0
Return values
bool

Search results