*/ abstract class BaseSaSitemap implements ArrayAccess { private $items = array(); private $url = null; private $title = null; private $priority = 0.8; private $changefreq = 'weekly'; public function __construct($title, $url = null) { $this->url = $url; $this->title = $title; } public function getUrl() { return $this->url; } public function hasUrl() { return strlen($this->url) > 0; } public function getTitle() { return $this->title; } public function getItems() { return $this->items; } public function hasItems() { return count($this->items) > 0; } public function addItem(saSitemap $item) { $this->items[] = $item; } public function offsetExists($offset) { return array_key_exists($offset, $this->items); } public function offsetGet($offset) { return $this->items[$offset]; } public function offsetSet($offset, $value) { $this->items[$offset] = $value; } public function offsetUnset($offset) { unset($this->items[$offset]); } public function getPriority() { return $this->priority; } public function setPriority($priority) { $this->priority = $priority; } public function getChangeFreq() { return $this->changefreq; } public function setChangeFreq($changefreq) { $this->changefreq = $changefreq; } }