gl-website-deployer/vendor/doctrine/rst-parser/lib/Directives/Replace.php

32 lines
588 B
PHP
Raw Normal View History

2024-11-19 08:02:04 +01:00
<?php
declare(strict_types=1);
namespace Doctrine\RST\Directives;
use Doctrine\RST\Nodes\Node;
use Doctrine\RST\Parser;
/**
* The Replace directive will set the variables for the spans
*
* .. |test| replace:: The Test String!
*/
final class Replace extends Directive
{
public function getName(): string
{
return 'replace';
}
/** @param string[] $options */
public function processNode(
Parser $parser,
string $variable,
string $data,
array $options
): ?Node {
return $parser->createSpanNode($data);
}
}