final class ImageModule extends Module

Images module.

Properties

$root

root of relative images (http)

$linkedRoot

root of linked images (http)

$fileRoot

physical location of images on server

$leftClass

left-floated images CSS class

$rightClass

right-floated images CSS class

$defaultAlt

default alternative text

Methods

__construct(Texy $texy)

No description

void
beforeParse(Texy $texy, $text)

Text pre-processing.

string
patternReferenceDef(array $matches)

Callback for: [image]: urls .(title)[class]{style}.

HtmlElement|string|null
patternImage(LineParser $parser, array $matches)

Callback for [* small.jpg 80x13 || big.jpg .(alternative text)[class]{style}>]:LINK.

void
addReference(string $name, Image $image)

Adds new named reference to image.

Image|null
getReference(string $name)

Returns named reference.

factoryImage(string $content, string $mod, bool $tryRef = true)

Parses image's syntax. Input: small.jpg 80x13 || linked.jpg

HtmlElement|null
solve(HandlerInvocation|null $invocation, Image $image, Link|null $link = null)

Finish invocation.

Details

at line 45
__construct(Texy $texy)

No description

Parameters

Texy $texy

at line 66
void beforeParse(Texy $texy, $text)

Text pre-processing.

Parameters

Texy $texy
$text

Return Value

void

at line 84
string patternReferenceDef(array $matches)

internal  
 

Callback for: [image]: urls .(title)[class]{style}.

Parameters

array $matches

Return Value

string

at line 100
HtmlElement|string|null patternImage(LineParser $parser, array $matches)

Callback for [* small.jpg 80x13 || big.jpg .(alternative text)[class]{style}>]:LINK.

Parameters

LineParser $parser
array $matches

Return Value

HtmlElement|string|null

at line 129
void addReference(string $name, Image $image)

Adds new named reference to image.

Parameters

string $name
Image $image

Return Value

void

at line 139
Image|null getReference(string $name)

Returns named reference.

Parameters

string $name

Return Value

Image|null

at line 153
Image factoryImage(string $content, string $mod, bool $tryRef = true)

Parses image's syntax. Input: small.jpg 80x13 || linked.jpg

Parameters

string $content
string $mod
bool $tryRef

Return Value

Image

at line 194
HtmlElement|null solve(HandlerInvocation|null $invocation, Image $image, Link|null $link = null)

Finish invocation.

Parameters

HandlerInvocation|null $invocation
Image $image
Link|null $link

Return Value

HtmlElement|null