gl-website-deployer/vendor/doctrine/rst-parser/tests/LiteralNestedInDirective/TipDirective.php

27 lines
625 B
PHP
Raw Normal View History

2024-11-19 08:02:04 +01:00
<?php
declare(strict_types=1);
namespace Doctrine\Tests\RST\LiteralNestedInDirective;
use Doctrine\RST\Directives\SubDirective;
use Doctrine\RST\Nodes\Node;
use Doctrine\RST\Parser;
class TipDirective extends SubDirective
{
/** @param string[] $options */
final public function processSub(Parser $parser, ?Node $document, string $variable, string $data, array $options): ?Node
{
return $parser->getNodeFactory()->createWrapperNode($document, '<div class="tip">', '</div>');
}
/**
* Get the directive name
*/
public function getName(): string
{
return 'tip';
}
}