PHP Class Texy\Modules\ImageModule

Inheritance: extends Texy\Module
Show file Open project: dg/texy

Public Properties

Property Type Description
$defaultAlt default alternative text
$fileRoot physical location of images on server
$leftClass left-floated images CSS class
$linkedRoot root of linked images (http)
$onLoad images onload handler
$rightClass right-floated images CSS class
$root root of relative images (http)

Public Methods

Method Description
__construct ( $texy )
addReference ( $name, Image $image ) : void Adds new named reference to image.
beforeParse ( Texy $texy, &$text ) : void Text pre-processing.
factoryImage ( $content, $mod, $tryRef = TRUE ) : Image Parses image's syntax.
getReference ( $name ) : Image Returns named reference.
patternImage ( Texy\LineParser $parser, array $matches ) : HtmlElement | string | FALSE Callback for [* small.jpg 80x13 | small-over.jpg | big.jpg .(alternative text)[class]{style}>]:LINK.
patternReferenceDef ( array $matches ) : string Callback for: [*image*]: urls .(title)[class]{style}.
solve ( HandlerInvocation $invocation = NULL, Image $image, Link $link = NULL ) : HtmlElement | FALSE Finish invocation.

Method Details

__construct() public method

public __construct ( $texy )

addReference() public method

Adds new named reference to image.
public addReference ( $name, Image $image ) : void
$image Texy\Image
return void

beforeParse() public method

Text pre-processing.
public beforeParse ( Texy $texy, &$text ) : void
$texy Texy
return void

factoryImage() public method

Parses image's syntax.
public factoryImage ( $content, $mod, $tryRef = TRUE ) : Image
return Texy\Image

getReference() public method

Returns named reference.
public getReference ( $name ) : Image
return Texy\Image reference descriptor (or FALSE)

patternImage() public method

Callback for [* small.jpg 80x13 | small-over.jpg | big.jpg .(alternative text)[class]{style}>]:LINK.
public patternImage ( Texy\LineParser $parser, array $matches ) : HtmlElement | string | FALSE
$parser Texy\LineParser
$matches array
return Texy\HtmlElement | string | FALSE

patternReferenceDef() public method

Callback for: [*image*]: urls .(title)[class]{style}.
public patternReferenceDef ( array $matches ) : string
$matches array
return string

solve() public method

Finish invocation.
public solve ( HandlerInvocation $invocation = NULL, Image $image, Link $link = NULL ) : HtmlElement | FALSE
$invocation Texy\HandlerInvocation
$image Texy\Image
$link Texy\Link
return Texy\HtmlElement | FALSE

Property Details

$defaultAlt public property

default alternative text
public $defaultAlt

$fileRoot public property

physical location of images on server
public $fileRoot

$leftClass public property

left-floated images CSS class
public $leftClass

$linkedRoot public property

root of linked images (http)
public $linkedRoot

$onLoad public property

images onload handler
public $onLoad

$rightClass public property

right-floated images CSS class
public $rightClass

$root public property

root of relative images (http)
public $root