ImageInlineNode
extends InlineNode
in package
FinalYes
In some Markup languages like Markdown Images are always considered inline. They can appear anywhere in a paragraph.
Table of Contents
Constants
- TYPE = 'image'
Properties
- $classes : array<string|int, string>
- $options : array<string, scalar|null>
- $value : TValue
- $altText : string
- $type : string
- $url : string
Methods
- __construct() : mixed
- getAltText() : string
- getClasses() : array<string|int, string>
- getClassesString() : string
- getOption() : mixed
- getOptions() : array<string, scalar|null>
- getType() : string
- getUrl() : string
- getValue() : TValue
- hasOption() : bool
- setClasses() : void
- Normalizes class names following the rules of identifier-normalization
- setValue() : void
- toString() : string
- withKeepExistingOptions() : static
- Adds $options as default options without overriding any options already set.
- withOptions() : static
Constants
TYPE
public
mixed
TYPE
= 'image'
Properties
$classes
protected
array<string|int, string>
$classes
= []
$options
protected
array<string, scalar|null>
$options
= []
$value
protected
TValue
$value
$altText read-only
private
string
$altText
$type read-only
private
string
$type
$url read-only
private
string
$url
Methods
__construct()
public
__construct(string $url, string $altText) : mixed
Parameters
- $url : string
- $altText : string
getAltText()
public
getAltText() : string
Return values
stringgetClasses()
public
getClasses() : array<string|int, string>
Return values
array<string|int, string>getClassesString()
public
getClassesString() : 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>getType()
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
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>