Download the PHP package tackk/cartographer without Composer
On this page you can find all versions of the php package tackk/cartographer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package cartographer
Cartographer
A sitemap generation tool for PHP following the Sitemap Protocol v0.9.
Cartographer can handle Sitemaps of any size. When generating sitemaps with more than 50,000 entries (the limit), the sitemap becomes a "map of maps" (i.e. nested sitemaps).
- GitHub Repo: http://github.com/tackk/cartographer/
- Documentation: http://tackk.github.io/cartographer/
Supported PHP/HHVM Versions
- PHP: >= 5.4 (including 5.6 beta1)
- HHVM: >= 3.0.0
Installation
Composer CLI
composer.json
Basic Sitemap
If you have a sitemap that is under 50,000 items, you can just use the Sitemap class, and avoid the Sitemap Generator.
Output
Basic Sitemap Index
If you want to build a Sitemap Index, separate from the Sitemap Generator, you can!
Output
Sitemap Factory
The Sitemap Factory create Sitemaps and Sitemap Indexes and writes them to the Filesystem. Is is can be used to generate full Sitemaps with more than 50,000 URLs.
If more than one sitemap is generated, it will create a Sitemap Index automatically.
Instantiating
The factory uses Flysystem to write the sitemaps. This means you can write the sitemaps to Local Disk, S3, Dropbox, wherever you want.
Base URL
The Base URL is used when generating the Sitemap Indexes, and for the returned entry point URL.
You can set the Base URL:
You can get the current base URL using getBaseUrl()
.
Creating a Sitemap
To create a sitemap you use the createSitemap
method. This method requires an Iterator
as
its only parameter.
Return Value
The two creation methods (createSitemap
and createSitemapIndex
) will return the URL
of the root sitemap file. If there is only 1 sitemap created, it will return just that URL.
If multiple sitemaps are created, then a Sitemap Index is generated and the URL to that is returned.
List of Created Files
You can get a list (array) of files the Factory has created by using the getFilesCreated
method.
Running Tests
This assumes you have ran composer update
.
From the repository root, run: