PHP code example of octave / sitemap-bundle
1. Go to this page and download the library: Download octave/sitemap-bundle library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
octave / sitemap-bundle example snippets
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new Octave\SitemapBundle\OctaveSitemapBundle(),
// ...
);
}
namespace AppBundle\Service;
use Octave\SitemapBundle\Service\SourceInterface;
use Octave\SitemapBundle\Model\Item;
class AppSitemapSource implements SourceInterface
{
public function getItems()
{
return [
new Item('http://mysite.com/', new \DateTime(), Item::FREQ_ALWAYS, 1.0)
];
}
}