PHP Class Texy\Modules\LinkModule

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

Public Properties

Property Type Description
$forceNoFollow always use rel="nofollow" for absolute links?
$imageClass image popup class
$imageOnClick image popup event
$popupOnClick class 'popup' event
$root root of relative links
$shorten shorten URLs to more readable form?

Public Methods

Method Description
__construct ( $texy )
addReference ( $name, Link $link ) : void Adds new named reference.
beforeParse ( Texy $texy, &$text ) : void Text pre-processing.
factoryLink ( $dest, $mMod, $label ) : Link
getReference ( $name ) : Link Returns named reference.
patternReference ( Texy\LineParser $parser, array $matches ) : HtmlElement | string | FALSE Callback for: [ref].
patternReferenceDef ( array $matches ) : string Callback for: [la trine]: http://www.latrine.cz/ text odkazu .(title)[class]{style}.
patternUrlEmail ( Texy\LineParser $parser, array $matches, $name ) : HtmlElement | string | FALSE Callback for: http://davidgrudl.com [email protected].
solve ( HandlerInvocation $invocation = NULL, Link $link, HtmlElement | string $content = NULL ) : HtmlElement | string Finish invocation.
solveNewReference ( HandlerInvocation $invocation, $name ) : FALSE Finish invocation.
solveUrlEmail ( HandlerInvocation $invocation, Link $link ) : HtmlElement | string Finish invocation.

Private Methods

Method Description
checkLink ( Link $link ) : void Checks and corrects $URL.
textualUrl ( Link $link ) : string Returns textual representation of URL.

Method Details

__construct() public method

public __construct ( $texy )

addReference() public method

Adds new named reference.
public addReference ( $name, Link $link ) : void
$link Texy\Link
return void

beforeParse() public method

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

getReference() public method

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

patternReference() public method

Callback for: [ref].
public patternReference ( Texy\LineParser $parser, array $matches ) : HtmlElement | string | FALSE
$parser Texy\LineParser
$matches array
return Texy\HtmlElement | string | FALSE

patternReferenceDef() public method

Callback for: [la trine]: http://www.latrine.cz/ text odkazu .(title)[class]{style}.
public patternReferenceDef ( array $matches ) : string
$matches array
return string

patternUrlEmail() public method

Callback for: http://davidgrudl.com [email protected].
public patternUrlEmail ( Texy\LineParser $parser, array $matches, $name ) : HtmlElement | string | FALSE
$parser Texy\LineParser
$matches array
return Texy\HtmlElement | string | FALSE

solve() public method

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

solveNewReference() public method

Finish invocation.
public solveNewReference ( HandlerInvocation $invocation, $name ) : FALSE
$invocation Texy\HandlerInvocation
return FALSE

solveUrlEmail() public method

Finish invocation.
public solveUrlEmail ( HandlerInvocation $invocation, Link $link ) : HtmlElement | string
$invocation Texy\HandlerInvocation
$link Texy\Link
return Texy\HtmlElement | string

Property Details

$forceNoFollow public property

always use rel="nofollow" for absolute links?
public $forceNoFollow

$imageClass public property

image popup class
public $imageClass

$imageOnClick public property

image popup event
public $imageOnClick

$popupOnClick public property

class 'popup' event
public $popupOnClick

$root public property

root of relative links
public $root

$shorten public property

shorten URLs to more readable form?
public $shorten