SitemapIndex extends AbstractSitemap implements SitemapIndex
Interfaces, Classes and Traits
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
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
Properties
$ext
Extension.
protected
string
$ext
= '.xml'
Tags
$lastMod
Last modify.
protected
Datetime
$lastMod
Tags
$file
resource.
private
object
$file
Tags
$raw
XML structure.
private
string
$raw
= '
<sitemap>
<loc>:url</loc>
<lastmod>:lastmod</lastmod>
</sitemap>'
Tags
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
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
Return values
void —close()
Close the sitemap file.
public
close() : void
Tags
Return values
void —delete()
Delete the sitemap.
public
delete((string) $file) : object
Parameters
- $file : (string)
-
File name with extension (.xml).
Tags
Return values
object —has()
Determine whether the sitemap exists.
public
has((string) $file) : bool
Parameters
- $file : (string)
-
File name with extension (.xml).
Tags
Return values
bool —read()
Read the sitemap file.
public
read() : xml
Tags
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
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
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.