Download the PHP package dpn/xml-sitemap-bundle without Composer

On this page you can find all versions of the php package dpn/xml-sitemap-bundle. 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 xml-sitemap-bundle

DpnXmlSitemapBundle

Build Status Scrutinizer Code Quality Code Coverage Latest Stable Version License

This bundle generates XML sitemaps for your favourite search engine by extracting sitemap information out of your application's routes. Additionally, you can create your own generators to provide URLs. The sitemap(s) generated follow the sitemap protocol.

Installation

  1. Install with composer:

    composer require dpn/xml-sitemap-bundle
  2. Enable the bundle in the kernel:

  3. Register the routing in app/config/routing.yml (this step is optional if using the console command to pre-generate the sitemaps)

Usage

Exposing Routes

To expose a route to the sitemap add the option sitemap to your route definition:

This will expose this route to your sitemap using the default options from your config. To control the options for this sitemap entry, add them to the sitemap option:

NOTE: Only routes without parameters may be exposed in this way. For routes with parameters, you must create a custom generator (see below).

Custom Generator

For more complex routes that have parameters, you must create a custom generator.

  1. Create a generator class that implements Dpn\XmlSitemapBundle\Sitemap\GeneratorInterface. This class must have a generate() method that returns an array of Dpn\XmlSitemapBundle\Sitemap\Entry objects.

  2. Add this class as a service tagged with dpn_xml_sitemap.generator:

Sitemap Index

According to sitemaps.org the maximum number of entries a sitemap.xml may have is 50,000. When the number of sitemap entries exceeds this, the entries are split across multiple sitemaps (ie /sitemap1.xml,/sitemap2.xml.../sitemapN.xml).

A sitemap index is accessible at /sitemap_index.xml.

The maximum entries per sitemap is configurable:

HTTP Caching

You can enable http caching for the sitemap(n).xml/sitemap_index.xml URI's by setting the number of seconds in your config:

Console Dump Command

The dpn:xml-sitemap:dump command is available to pre-generate sitemap.xml files:

NOTE: The command requires Symfony 2.4+.

Full Default Configuration

The following is the default configuration for this bundle:

License

See Resources/meta/LICENSE.


All versions of xml-sitemap-bundle with dependencies

PHP Build Version
Package Version
Requires symfony/framework-bundle Version ^2.7|^3.0
symfony/twig-bundle Version ^2.7|^3.0
symfony/dependency-injection Version ^2.7|^3.0
symfony/templating Version ^2.7|^3.0
symfony/asset Version ^2.7|^3.0
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 dpn/xml-sitemap-bundle contains the following files

Loading the files please wait ....