Download the PHP package samdark/sitemap without Composer
On this page you can find all versions of the php package samdark/sitemap. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download samdark/sitemap
More information about samdark/sitemap
Files in samdark/sitemap
Download samdark/sitemap
More information about samdark/sitemap
Files in samdark/sitemap
Vendor samdark
Package sitemap
Short Description Sitemap and sitemap index builder
License BSD-3-Clause
Homepage https://github.com/samdark/sitemap
Package sitemap
Short Description Sitemap and sitemap index builder
License BSD-3-Clause
Homepage https://github.com/samdark/sitemap
Keywords Sitemap
Please rate this library. Is it a good library?
Informations about the package sitemap
Sitemap
XML Sitemap and XML Sitemap Index builder.
Features
- Create sitemap files: either regular or gzipped.
- Create multi-language sitemap files.
- Create sitemap index files.
- Use custom stylesheet.
- Automatically creates new file if either URL limit or file size limit is reached.
- Fast and memory efficient.
Installation
Installation via Composer is very simple:
After that, make sure your application autoloads Composer classes by including
vendor/autoload.php
.
How to use it
Multi-language sitemap
Options
There are methods to configure Sitemap
instance:
setMaxUrls($number)
. Sets maximum number of URLs to write in a single file. Default is 50000 which is the limit according to specification and most of existing implementations.setMaxBytes($number)
. Sets maximum size of a single site map file. Default is 10MiB which should be compatible with most current search engines.setBufferSize($number)
. Sets number of URLs to be kept in memory before writing it to file. Default is 10. Bigger values give marginal benefits. On the other hand when the file size limit is hit, the complete buffer must be written to the next file.setUseIndent($bool)
. Sets if XML should be indented. Default is true.setUseGzip($bool)
. Sets whether the resulting sitemap files will be gzipped or not. Default isfalse
.zlib
extension must be enabled to use this feature.setStylesheet($string)
. Sets thexml-stylesheet
tag. By default, tag is not generated. See example example-sitemap-stylesheet.xsl
There is a method to configure Index
instance:
setUseGzip($bool)
. Sets whether the resulting index file will be gzipped or not. Default isfalse
.zlib
extension must be enabled to use this feature.setStylesheet($string)
. Sets thexml-stylesheet
tag. By default, tag is not generated. See example example-sitemap-stylesheet.xsl
Running tests
In order to run tests perform the following commands:
All versions of sitemap with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.3.0
ext-xmlwriter Version *
ext-xmlwriter Version *
The package samdark/sitemap contains the following files
Loading the files please wait ....