Class TexyHeadingModule


Heading module.

TexyObject
   |
   --TexyModule
      |
      --TexyHeadingModule
Copyright: Copyright (c) 2004, 2010 David Grudl
Located: in /modules/TexyHeadingModule.php (line 25)
Constructor Summary
public
__construct ($texy)
Method Summary
void
afterParse (Texy $texy, TexyHtml $DOM, bool $isSingleLine)
void
TexyHtml|string|FALSE
patternSurround (TexyBlockParser $parser, array $matches, string 2)
Callback for surrounded heading.
TexyHtml|string|FALSE
patternUnderline (TexyBlockParser $parser, array $matches, string 2)
Callback for underlined heading.
TexyHtml
solve (TexyHandlerInvocation $invocation, int $level, string $content, TexyModifier $mod, bool $isSurrounded)
Finish invocation.
Methods Inherited From TexyObject
TexyObject::extensionMethod(), TexyObject::getClass(), TexyObject::getReflection(), TexyObject::__call(), TexyObject::__callStatic(), TexyObject::__get(), TexyObject::__isset(), TexyObject::__set(), TexyObject::__unset()
Constant Summary
int DYNAMIC 1

line 28

int FIXED 2

line 28

Variable Summary
int $balancing TexyHeadingModule::DYNAMIC

line 50

balancing mode
bool $generateID FALSE

line 38

autogenerate ID
string $idPrefix 'toc-'

line 41

prefix for autogenerated ID
array $levels array( '#' => 0, // # --> $levels['#'] + $top = 0 + 1 = 1 --> <h1> ......

line 53

when $balancing = TexyHeadingModule::FIXED
bool $moreMeansHigher TRUE

line 47

surrounded headings: more #### means higher heading
string $title

line 32

textual content of first heading
array $TOC

line 35

generated Table of Contents
int $top 1

line 44

level of top heading, 1..6

Constructor Details

line 65

__construct

public __construct ($texy)

Input
$texy
Method Details

line 104

afterParse

public void afterParse (Texy $texy, TexyHtml $DOM, bool $isSingleLine)

Input
Texy $texy
TexyHtml $DOM
bool $isSingleLine
Output
void  

line 89

beforeParse

public void beforeParse ()

Output
void  

line 207

patternSurround

public TexyHtml|string|FALSE patternSurround (TexyBlockParser $parser, array $matches, string 2)

Callback for surrounded heading.

### Heading .(title)[class]{style}>

Input
TexyBlockParser $parser
array $matches regexp matches
string 2 pattern name
Output
TexyHtml|string|FALSE  

line 182

patternUnderline

public TexyHtml|string|FALSE patternUnderline (TexyBlockParser $parser, array $matches, string 2)

Callback for underlined heading.

Heading .(title)[class]{style}> -------------------------------

Input
TexyBlockParser $parser
array $matches regexp matches
string 2 pattern name
Output
TexyHtml|string|FALSE  

line 233

solve

public TexyHtml solve (TexyHandlerInvocation $invocation, int $level, string $content, TexyModifier $mod, bool $isSurrounded)

Finish invocation.

Input
TexyHandlerInvocation $invocation handler invocation
int $level 0..5
string $content
TexyModifier $mod
bool $isSurrounded
Output
TexyHtml