Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
59 lines (49 sloc) 1.02 KB
<?php declare(strict_types=1);
namespace Thepixeldeveloper\Sitemap;
use DateTimeInterface;
use Thepixeldeveloper\Sitemap\Interfaces\DriverInterface;
use Thepixeldeveloper\Sitemap\Interfaces\VisitorInterface;
class Sitemap implements VisitorInterface
{
/**
* Location (URL).
*
* @var string
*/
private $loc;
/**
* Last modified time.
*
* @var DateTimeInterface
*/
private $lastMod;
public function __construct(string $loc)
{
$this->loc = $loc;
}
/**
* @return string
*/
public function getLoc(): string
{
return $this->loc;
}
/**
* @return DateTimeInterface|null
*/
public function getLastMod()
{
return $this->lastMod;
}
/**
* @param DateTimeInterface $lastMod
*/
public function setLastMod(DateTimeInterface $lastMod)
{
$this->lastMod = $lastMod;
}
public function accept(DriverInterface $driver)
{
$driver->visitSitemap($this);
}
}
You can’t perform that action at this time.