WACT_TEMPLATE
[ class tree: WACT_TEMPLATE ] [ index: WACT_TEMPLATE ] [ all elements ]

Class: SourceFileParser

Source Location: /framework/template/compiler/sourcefileparser.inc.php

http://wact.sourceforge.net/index.php/SourceFileParser

Class Overview


The source template parser is the core of the WACT template engine

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

The source template parser is the core of the WACT template engine

Class Variables


$ComponentParsingState =

Initial instance of ComponentParsingState
access:  private
Type:   ComponentParsingState

$LiteralParsingState =

Initial instance of LiteralParsingState
access:  private
Type:   LiteralParsingState

$SourceFile =

Path and filename of source template
access:  private
Type:   string

$State =

The current active state
var:  subclass
access:  public
Type:   BaseParsingState

Class Methods


constructor SourceFileParser

Constructs SourecFileParser.

Uses readTemplateFile() to get the contents of the template.



SourceFileParser SourceFileParser( string $sourcefile)

API Tags:

access:  protected
see:  readTemplateFile

Parameters:

string   $sourcefile   path and filename of source template

method buildFilterChain

Creates Build a filter chain

HTMLParser &buildFilterChain( mixed $saxfilters)

API Tags:

access:  protected

method cdata

Sax CDATA Handler

void cdata( string $text)

API Tags:

access:  private

Parameters:

string   $text   text content in tag

method changeToComponentParsingState

Switch to component parsing state

void changeToComponentParsingState( )

API Tags:

access:  public

method changeToLiteralParsingState

Switch to literal parsing state

void changeToLiteralParsingState( string $tag)

API Tags:

access:  public

Parameters:

string   $tag   tag name marking the literal component

method characters

Sax Data Handler

void characters( string $text)

API Tags:

access:  private

Parameters:

string   $text   text content in tag

method comment

Sax XML Comment Handler

void comment( string $text)

API Tags:

access:  private

Parameters:

string   $text   text content in comment

method doctype

Sax XML doctype Handler

void doctype( string $text)

API Tags:

access:  private

Parameters:

string   $text   text content in doctype

method emptyElement

Sax Open Handler

void emptyElement( string $tag, array $attrs)

API Tags:

access:  private

Parameters:

string   $tag   tag name
array   $attrs   attributes

method endElement

Sax Close Handler

void endElement( string $tag)

API Tags:

access:  private

Parameters:

string   $tag   tag name

method escape

Sax XML Escape Handler

void escape( string $text)

API Tags:

access:  private

Parameters:

string   $text   text content in escape

method invalidAttributeSyntax

Sax Attribute syntax Error Handler

void invalidAttributeSyntax( string 0)

API Tags:

access:  private

Parameters:

string   0   text content in tag

method invalidEntitySyntax

Sax Entity syntax Error Handler

void invalidEntitySyntax( string $text)

API Tags:

access:  private

Parameters:

string   $text   text content in tag

method jasp

Sax JSP / ASP markup Handler

void jasp( string $text)

API Tags:

access:  private

Parameters:

string   $text   text content in JASP tags

method parse

Used to parse the source template.

Initially invoked by the CompileTemplate function, the first component argument being a ComponentTree. Uses the TagDictionary to spot compiler components



void parse( object &$ComponentRoot)

API Tags:

access:  protected
see:  ComponentTree
see:  CompileTemplate

Parameters:

object   &$ComponentRoot   compile time component

method processingInstruction

Sax Processing Instruction Handler

void processingInstruction( string $target, string $instruction)

API Tags:

access:  private

Parameters:

string   $target   target processor (e.g. php)
string   $instruction   text content in PI

method setDocumentLocator

Document Locator Handler

void setDocumentLocator( Locator &$locator)

API Tags:

access:  private

Parameters:

Locator   &$locator  

method startElement

Sax Open Handler

void startElement( string $tag, array $attrs)

API Tags:

access:  private

Parameters:

string   $tag   tag name
array   $attrs   attributes

method unexpectedEOF

Sax EOF Handler

void unexpectedEOF( string $text)

API Tags:

access:  private

Parameters:

string   $text   text content in tag
WACT: Copyright 2003 Procata, Inc. Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html)
Documentation generated on Sun, 28 Nov 2004 19:50:25 -0800 by phpDocumentor 1.2.3