8fold / php-sitemap
A library for generating Sitemaps (XML)
3.0.0
2026-11-19 02:08 UTC
Requires
- php: ^8.1
- 8fold/php-xml-builder: ^4.0
Requires (Dev)
- dealerdirect/phpcodesniffer-composer-installer: ^1.2
- phpstan/extension-installer: *
- phpstan/phpstan: ^2.0.0
- phpstan/phpstan-strict-rules: ^2.1
- phpunit/phpunit: ^9.5.21 || ^10.5.9 || ^11.0.0 || ^12.0.0 || ^13.0.0
- spaze/phpstan-disallowed-calls: ^4.15
- squizlabs/php_codesniffer: ^3.6 || ^4.0
- symfony/process: ^5.4 || ^6.0 || ^7.0 || ^8.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-19 02:10:56 UTC
README
Generates valid XML document and sitemap elements based on the Sitemap protocol.
| Schema | Version |
|---|---|
| 0.9 | Latest |
Installation
composer require 8fold/php-sitemap
Usage
You have received the required metadata in an array; could be the results of a database query.
use Eigthfold\Sitemap\Sitemap; $sitemap = Sitemap::create('http://yourdomain.com'); $items = // your array of items foreach ($items as $item) { $sitemap = $sitemap->addUrl( $item->path ); } (string) $sitemap;
Details
Designed to fit within a loop.
Other
{links or descriptions or license, versioning, and governance}