Files
2025-08-02 16:30:27 +02:00

66 lines
1.2 KiB
PHP

<?php
namespace KupShop\FeedGeneratorBundle\Configuration;
use KupShop\FeedGeneratorBundle\Configuration\Nodes\INode;
class Configuration implements IHasIterableNodes
{
private $beginning = '';
private $end = '';
/** @var INode[] */
private $nodes = [];
public function getBeginning(): string
{
return $this->beginning;
}
public function setBeginning(string $beginning = '')
{
$this->beginning = $beginning;
}
public function getEnd(): string
{
return $this->end;
}
public function setEnd(string $end = '')
{
$this->end = $end;
}
/**
* @return INode[]
*/
public function getNodes(): array
{
return $this->nodes;
}
/**
* @param INode[] $nodes
*/
public function setNodes(array $nodes)
{
$this->nodes = $nodes;
}
public function hasNodes(): bool
{
return count($this->nodes) > 0;
}
public function addNode(INode $node)
{
$this->nodes[] = $node;
}
public function accept(IConfigurationVisitor $visitor, &$param = null)
{
$visitor->visitConfiguration($this, $param);
}
}