Guides

Directive
in package

FinalYes
Attributes
#[Attribute]
\Attribute::TARGET_CLASS

Table of Contents

Properties

$aliases  : array<string|int, mixed>
$name  : string
$rawContent  : bool

Methods

__construct()  : mixed

Properties

$aliases read-only

public array<string|int, mixed> $aliases = []

$rawContent read-only

public bool $rawContent = false

Methods

__construct()

public __construct(string $name[, array<string|int, string> $aliases = [] ][, bool $rawContent = false ]) : mixed
Parameters
$name : string
$aliases : array<string|int, string> = []
$rawContent : bool = false

If set, the directive's body is captured as literal source text (DirectiveNode::getRawContent()) instead of being parsed into child nodes -- for directives whose content isn't reStructuredText (e.g. raw HTML/LaTeX passthrough). Parsing such content as RST would corrupt it (e.g. a line that looks like a section title gets misinterpreted), so it's skipped entirely rather than parsed and discarded.

On this page

Search results