gl-website-deployer/vendor/doctrine/rst-parser/lib/Parser/Directive.php
2024-11-19 08:02:04 +01:00

57 lines
1.0 KiB
PHP

<?php
declare(strict_types=1);
namespace Doctrine\RST\Parser;
final class Directive
{
/** @var string */
private $variable;
/** @var string */
private $name;
/** @var string */
private $data;
/** @var mixed[] */
private $options = [];
/** @param mixed[] $options */
public function __construct(string $variable, string $name, string $data, array $options = [])
{
$this->variable = $variable;
$this->name = $name;
$this->data = $data;
$this->options = $options;
}
public function getVariable(): string
{
return $this->variable;
}
public function getName(): string
{
return $this->name;
}
public function getData(): string
{
return $this->data;
}
/** @return mixed[] */
public function getOptions(): array
{
return $this->options;
}
/** @param mixed $value */
public function setOption(string $key, $value): void
{
$this->options[$key] = $value;
}
}