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

Class: Temply

Source Location: /Temply.class.php

Class Overview


Temply.class.php


Author(s):

Version:

  • 0.1

Copyright:

  • Copyright (c) 2010 Oliver Matuschin

Variables

Constants

Methods



Class Details

[line 22]
Temply.class.php

This class does all the parsing stuff. It looks for possible tags inside of a given template string, using the TagHandler to identify valid tags. The output of all valid tags is then inserted into the template string, replacing the tags.

See http://www.oliver-matuschin.de for more information and version udpates.




Tags:

author:  Oliver Matuschin <mail@oliver-matuschin.de>
version:  0.1
copyright:  Copyright (c) 2010 Oliver Matuschin
license:  LGPL


[ Top ]


Class Variables

$tagHandler =  null

[line 24]



Tags:

access:  private

Type:   mixed


[ Top ]



Class Methods


method getTagHandler [line 82]

ITagHandler getTagHandler( )

Returns the current TagHandler.



Tags:

return:  The current TagHandler.
access:  public


[ Top ]

method isInvisibleChar [line 370]

boolean isInvisibleChar( string $char)

Checks whether the given character is visible or not.



Tags:

return:  True if the character is invisible, false otherwise.
access:  protected


Parameters:

string   $char   The character to check.

[ Top ]

method parse [line 93]

string parse( string $content)

Parses the content of the provided string, using the current TagHandler for tag processing.



Tags:

return:  The parsed content.
access:  public


Parameters:

string   $content   The content to parse.

[ Top ]

constructor __construct [line 61]

Temply __construct( [ITagHandler $tagHandler = null])

The constructor of Temply. If no TagHandler is provided, or if the TagHandler is null, an instance of the EmptyTagHandler will be used for tag processing.



Tags:

access:  public


Parameters:

ITagHandler   $tagHandler   [optional] The TagHandler.

[ Top ]

method setTagHandler [line 73]

void setTagHandler( ITagHandler $tagHandler)

Sets the TagHandler to be used by Temply.



Tags:

access:  public


Parameters:

ITagHandler   $tagHandler   The TagHandler.

[ Top ]


Class Constants

PARSER_BEGIN_TAG =  '['

[line 35]


[ Top ]

PARSER_CLOSE_CHAR =  '/'

[line 38]


[ Top ]

PARSER_DIVIDER_CHAR =  ':'

[line 37]


[ Top ]

PARSER_END_TAG =  ']'

[line 36]


[ Top ]

PARSER_STATE_READVALUE =  7

[line 50]


[ Top ]

PARSER_STATE_READ_ATTRNAME =  4

[line 47]


[ Top ]

PARSER_STATE_READ_TAGNAME =  1

[line 44]


[ Top ]

PARSER_STATE_RESET =  9

[line 52]


[ Top ]

PARSER_STATE_SEARCHASSIGNMENT =  5

[line 48]


[ Top ]

PARSER_STATE_SEARCHATTR =  3

[line 46]


[ Top ]

PARSER_STATE_SEARCHDIVIDER =  2

[line 45]


[ Top ]

PARSER_STATE_SEARCHENDOFTAG =  8

[line 51]


[ Top ]

PARSER_STATE_SEARCHTAG =  0

[line 43]


[ Top ]

PARSER_STATE_SEARCHVALUE =  6

[line 49]


[ Top ]



Documentation generated on Sat, 19 Jun 2010 17:07:51 +0200 by phpDocumentor 1.4.0