Download the PHP package cahuk/sitemap-generator without Composer
On this page you can find all versions of the php package cahuk/sitemap-generator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download cahuk/sitemap-generator
More information about cahuk/sitemap-generator
Files in cahuk/sitemap-generator
Package sitemap-generator
Short Description Flexible PHP sitemap generator
License MIT
Homepage https://github.com/cahuk/sitemap-generator
Informations about the package sitemap-generator
Sitemap Generator
A flexible, high-performance PHP library for generating XML sitemaps of any scale.
Supports multiple URL providers, automatic partitioning, indexing, configurable priorities, frequencies, timestamps, and flexible storage options.
This package follows a clean DDD-inspired structure with separation between Domain, Application, and Infrastructure layers.
๐ Features
- Generate XML sitemaps with zero external dependencies
- Multiple sitemap sections (pages, blog, categories, etc.)
- Automatic sitemap partitioning (e.g., split every 50,000 URLs or at your choice)
- Fully customizable URL providers
- Built-in XML renderer
- Local filesystem writer (can be extended to S3, FTP, DB, etc.)
- Strong DTOs, enums, and typed entries
- Simple integration into any PHP project (Symfony, Laravel, custom framework)
๐ Installation
Install via Composer:
๐งฉ Basic Example
Below is a real working example based directly on this package:
๐ Output
The generator produces:
With automatic
๐งฑ URL Entry Providers
This package ships out of the box with a ready-to-use provider: โ ArrayUrlEntryProvider (built-in) A simple provider that accepts an associative array where:
- keys = URL strings
- values = metadata (lastModified, priority, changeFreq, ...)
๐งฉ Creating Custom Providers
If the built-in ArrayUrlEntryProvider is not enough, you can easily create your own custom provider by implementing:
This allows you to fetch URLs from:
- a database
- an API
- CMS
- search index
- filesystem
- any dynamic source Example skeleton:
๐งช Performance
- The generator tracks:
- Execution time
- URL count
- Memory usage
- Peak memory usage
All versions of sitemap-generator with dependencies
ext-dom Version *