DocReferenceNode
extends AbstractLinkInlineNode
in package
implements
CrossReferenceNode
FinalYes
Represents a link to document
Supported formats
:doc:foo
:doc:domain:foo
:doc:foo/subdoc#anchor
:doc:custom text <foo>
:doc:custom text <domain:foo/subdoc#anchor>
Table of Contents
Interfaces
- CrossReferenceNode
- A cross-reference node is a link node that can reference targets outside of the current document.
Constants
- TYPE = 'doc'
Properties
- $classes : array<string|int, string>
- $options : array<string, scalar|null>
- $value : TValue
- $interlinkDomain : string
- $targetReference : string
- $type : string
- $url : string
Methods
- __construct() : mixed
- getClasses() : array<string|int, string>
- getClassesString() : string
- getDebugInformation() : array<string, string>
- getInterlinkDomain() : string
- getInterlinkGroup() : string
- getOption() : mixed
- getOptions() : array<string, scalar|null>
- getTargetReference() : string
- getType() : string
- getUrl() : string
- getValue() : TValue
- hasOption() : bool
- 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
TYPE
public
final mixed
TYPE
= 'doc'
Properties
$classes
protected
array<string|int, string>
$classes
= []
$options
protected
array<string, scalar|null>
$options
= []
$value
protected
TValue
$value
$interlinkDomain read-only
private
string
$interlinkDomain
= ''
$targetReference read-only
private
string
$targetReference
$type read-only
private
string
$type
$url
private
string
$url
= ''
Methods
__construct()
public
__construct(string $targetDocument[, string $value = '' ][, string $interlinkDomain = '' ]) : mixed
Parameters
- $targetDocument : string
- $value : string = ''
- $interlinkDomain : string = ''
getClasses()
public
getClasses() : array<string|int, string>
Return values
array<string|int, string>getClassesString()
public
getClassesString() : string
Return values
stringgetDebugInformation()
public
getDebugInformation() : array<string, string>
Return values
array<string, string>getInterlinkDomain()
public
getInterlinkDomain() : string
Return values
stringgetInterlinkGroup()
public
getInterlinkGroup() : string
Return values
stringgetOption()
public
getOption(string $name[, TType|null $default = null ]) : mixed
Parameters
- $name : string
- $default : TType|null = null
Tags
getOptions()
public
getOptions() : array<string, scalar|null>
Return values
array<string, scalar|null>getTargetReference()
public
getTargetReference() : string
Return values
stringgetType()
public
getType() : string
Return values
stringgetUrl()
public
getUrl() : string
Return values
stringgetValue()
public
getValue() : TValue
Return values
TValuehasOption()
public
hasOption(string $name) : bool
Parameters
- $name : string
Return values
boolsetClasses()
Normalizes class names following the rules of identifier-normalization
public
setClasses(array<string|int, string> $classes) : void
Parameters
- $classes : array<string|int, string>
Tags
setUrl()
public
setUrl(string $url) : void
Parameters
- $url : string
setValue()
public
setValue(TValue $value) : void
Parameters
- $value : TValue
toString()
public
toString() : string
Return values
stringwithKeepExistingOptions()
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
staticwithOptions()
public
withOptions(array<string, scalar|null> $options) : static
Parameters
- $options : array<string, scalar|null>