Method | Description | |
---|---|---|
__construct ( string $filePath ) | ||
addItem ( string $location, integer $lastModified = null, float $changeFrequency = null, string $priority = null ) | Adds a new item to sitemap | |
getSitemapUrls ( string $baseUrl ) : array | Returns an array of URLs written | |
getWrittenFilePath ( ) : array | Get array of generated files | |
setBufferSize ( integer $number ) | Sets number of URLs to be kept in memory before writing it to file. | |
setMaxUrls ( integer $number ) | Sets maximum number of URLs to write in a single file. | |
setUseIndent ( boolean $value ) | Sets if XML should be indented. | |
write ( ) | Finishes writing |
Method | Description | |
---|---|---|
validateLocation ( string $location ) | Takes a string and validates, if the string is a valid url |
Method | Description | |
---|---|---|
createNewFile ( ) | Creates new file | |
finishFile ( ) | Writes closing tags to current file | |
flush ( ) | Flushes buffer into file | |
getCurrentFilePath ( ) : string |
public __construct ( string $filePath ) | ||
$filePath | string | path of the file to write to |
public addItem ( string $location, integer $lastModified = null, float $changeFrequency = null, string $priority = null ) | ||
$location | string | location item URL |
$lastModified | integer | last modification timestamp |
$changeFrequency | float | change frequency. Use one of self:: constants here |
$priority | string | item's priority (0.0-1.0). Default null is equal to 0.5 |
public getSitemapUrls ( string $baseUrl ) : array | ||
$baseUrl | string | base URL of all the sitemaps written |
return | array | URLs of sitemaps written |
public getWrittenFilePath ( ) : array | ||
return | array |
public setBufferSize ( integer $number ) | ||
$number | integer |
protected validateLocation ( string $location ) | ||
$location | string |