Guides

ReferenceNode extends AbstractLinkInlineNode
in package
implements CrossReferenceNode

FinalYes

CrossReferences are references outside a document. As parsing is file based normal references are in document, refering to other documents.

Supported formats

:ref:`link`
:ref:`custom text <link>`

Cross-references are resolved at the start of the rendering phase.

Table of Contents

Interfaces

CrossReferenceNode
A cross-reference node is a link node that can reference targets outside of the current document.

Constants

TYPE  = 'ref'

Properties

$classes  : array<string|int, string>
$options  : array<string, scalar|null>
$value  : TValue
$interlinkDomain  : string
$linkType  : string
$prefix  : string
$targetReference  : string
$type  : string
$url  : string

Methods

__construct()  : mixed
addChildNode()  : void
getChildren()  : array<string|int, TValue>
getClasses()  : array<string|int, string>
getClassesString()  : string
getDebugInformation()  : array<string, string>
getInterlinkDomain()  : string
getInterlinkGroup()  : string
getLinkType()  : string
getOption()  : mixed
getOptions()  : array<string, scalar|null>
getPlainTextInlineNode()  : self
getPrefix()  : string
getTargetReference()  : string
getType()  : string
getUrl()  : string
getValue()  : string
hasOption()  : bool
pushChildNode()  : void
removeNode()  : self
replaceNode()  : self
setClasses()  : void
Normalizes class names following the rules of identifier-normalization
setUrl()  : void
setValue()  : void
toString()  : string
withKeepExistingOptions()  : static
Adds $options as default options without overriding any options already set.
withOptions()  : static

Constants

Properties

$classes

protected array<string|int, string> $classes = []

$options

protected array<string, scalar|null> $options = []

$interlinkDomain read-only

private string $interlinkDomain = ''

$linkType read-only

private string $linkType = SectionNode::STD_LABEL

Methods

__construct()

public __construct(string $targetReference[, string $value = '' ][, string $interlinkDomain = '' ][, string $linkType = SectionNode::STD_LABEL ][, string $prefix = '' ]) : mixed
Parameters
$targetReference : string
$value : string = ''
$interlinkDomain : string = ''
$linkType : string = SectionNode::STD_LABEL
$prefix : string = ''

addChildNode()

public addChildNode(TValue $node) : void
Parameters
$node : TValue

getChildren()

public getChildren() : array<string|int, TValue>
Return values
array<string|int, TValue>

getClasses()

public getClasses() : array<string|int, string>
Return values
array<string|int, string>

getClassesString()

public getClassesString() : string
Return values
string

getDebugInformation()

public getDebugInformation() : array<string, string>
Return values
array<string, string>

getInterlinkDomain()

public getInterlinkDomain() : string
Return values
string

getInterlinkGroup()

public getInterlinkGroup() : string
Return values
string

getLinkType()

public getLinkType() : string
Return values
string

getOption()

public getOption(string $name[, TType|null $default = null ]) : mixed
Parameters
$name : string
$default : TType|null = null
Tags
phpstan-return

($default is null ? mixed|null: TType|null)

getOptions()

public getOptions() : array<string, scalar|null>
Return values
array<string, scalar|null>

getPlainTextInlineNode()

public static getPlainTextInlineNode(string $content) : self
Parameters
$content : string
Return values
self

getPrefix()

public getPrefix() : string
Return values
string

hasOption()

public hasOption(string $name) : bool
Parameters
$name : string
Return values
bool

pushChildNode()

public pushChildNode(TValue $node) : void
Parameters
$node : TValue

removeNode()

public removeNode(int $key) : self
Parameters
$key : int
Tags
@return

$this<TValue>

Return values
self

replaceNode()

public replaceNode(int $key, TValue $node) : self
Parameters
$key : int
$node : TValue
Tags
@return

$this<TValue>

Return values
self

withKeepExistingOptions()

Adds $options as default options without overriding any options already set.

public withKeepExistingOptions(array<string, scalar|null> $options) : static
Parameters
$options : array<string, scalar|null>
Return values
static

withOptions()

public withOptions(array<string, scalar|null> $options) : static
Parameters
$options : array<string, scalar|null>
Return values
static

        
On this page

Search results