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

Class: ITagHandler

Source Location: /ITagHandler.class.php

Interface Overview


ITagHandler.class.php


Author(s):

Version:

  • 0.1

Copyright:

  • Copyright (c) 2010 Oliver Matuschin

Methods



Class Details

[line 18]
ITagHandler.class.php

Every TagHandler for use with Temply should implement this interface. It provides all methods required by Temply.

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 Methods


method isTag [line 26]

boolean isTag( string $tagName)

This method is called by Temply to check whether a given string is a valid tag.



Tags:

return:  Should return true if the specified string is a valid tag, false otherwise.
access:  public


Parameters:

string   $tagName   The name of the tag to check.

[ Top ]

method preprocessAttribute [line 59]

string preprocessAttribute( string $attrName, string $attrValue, boolean $quoted)

This method is called by the ThemplateParser <strong>before</strong> the methods processSingleTag or processBlockTag are called.

It can be used to change the value of any attribute, if needed.




Tags:

return:  The new value of the given attribute.
access:  public


Parameters:

string   $attrName   The name of the attribute.
string   $attrValue   The value of the attribute.
boolean   $quoted   True, if the value of the attribute is quoted, false otherwise.

[ Top ]

method processBlockTag [line 47]

string processBlockTag( string $tagName, $attributes, string $blockContent)

This method is called by Temply whenever a valid tag is found which also has an end-tag.



Tags:

return:  Returns the string to be inserted into the template.
access:  public


Parameters:

string   $tagName   The name of the tag.
array   $attributes   Attributes and values of the tag.
string   $blockContent   The content between the start- and end-tag.

[ Top ]

method processSingleTag [line 36]

string processSingleTag( string $tagName, $attributes)

This method is called by Temply whenever a valid tag is found which does not have any content.



Tags:

return:  Returns the string to be inserted into the template.
access:  public


Parameters:

string   $tagName   The name of the tag.
array   $attributes   Attributes and values of the tag.

[ Top ]


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