Download the PHP package dalpras/sitemap without Composer

On this page you can find all versions of the php package dalpras/sitemap. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sitemap

dalpras/sitemap

A small PHP library for generating XML sitemaps and sitemap indexes, with support for validation, splitting large sitemaps, and writing output to the filesystem.

Features

Installation

Install with Composer:

Core concepts

Sitemap

A sitemap container identified by a name.

SitemapEntry

Represents a single URL entry in a sitemap.

SitemapGenerator

Validates entries, splits large sitemaps when necessary, renders XML, and writes output.

SitemapConfig

Controls generator behavior, including:

FilesystemWriter

Writes generated sitemap files to a target folder.

Basic example

Runtime factories

The library supports creating generators at runtime with different entry and sitemap base URLs, plus a different output folder.

This is useful when the same application needs to generate multiple sitemap sets in a single execution, such as one sitemap per domain, storefront, or tenant.

Instead of mutating shared services, the library uses immutable config helpers and a factory.

Why factories?

In most container-based applications, SitemapConfig and FilesystemWriter are shared services.

Changing them directly during command execution would make them stateful and unsafe. Factories avoid that by creating a fresh SitemapGenerator with runtime-specific values.

Immutable config helpers

SitemapConfig::withEntryBaseUrl()

Returns a new config instance with a different entryBaseUrl, preserving the rest of the configuration.

SitemapConfig::withSitemapBaseUrl()

Returns a new config instance with a different sitemapBaseUrl, preserving the rest of the configuration.

FilesystemWriter::withFolder()

Returns a new writer instance targeting a different folder.

SitemapGeneratorFactory

Use SitemapGeneratorFactory to create a fresh generator for each runtime context.

This allows you to reuse the default library services while changing:

Example: generate a sitemap with runtime configuration

Example: absolute entry URLs with separate sitemap file base URL

This is the recommended setup when your application already knows the canonical entry URLs and stores sitemap files under a public /sitemaps path.

In this setup:

Example: generate multiple sitemap sets in one command

Factories are especially useful when generating multiple sitemap groups in a single process.

This keeps services immutable while allowing each sitemap run to target a different domain and folder.

Factory API

SitemapGeneratorFactory::create()

Parameters:

Recommended usage

Use the explicit API:

Use baseUrl only for backward compatibility when both bases are intentionally the same:

Notes

URL resolution behavior

This separation avoids mistakes when sitemap files are publicly served from a subpath such as /sitemaps.

Output folder override

The runtime folder override is supported when the configured writer is FilesystemWriter.

If another writer implementation is used, runtime folder override may not be available.

What changed

Added

Deprecated


All versions of sitemap with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
ext-dom Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package dalpras/sitemap contains the following files

Loading the files please wait ...