Class string_tags

Description

Extracts the tags and corresponding text from a string

Located in /class.string_tags.php (line 40)


	
			
Variable Summary
 struct(array) $aHREF
 struct(array) $aTAGS
 integer $iTagMaxElem
Method Summary
 void __construct ([numeric $p_tagmax = 10])
 boolean CloseTag (sting $p_tag, array $p_array)
 string expand_parameters (struct $pResult)
 array get_tags (string $p_str)
 boolean OpenTag (string $p_tag, array $p_array)
 array optimize_tags (array $result)
Variables
struct(array) $aHREF (line 56)

Contains the links for the tags that have specified this parameter

  • access: protected
struct(array) $aTAGS = array() (line 48)

Contains the Tag/String Correspondence

  • access: protected
integer $iTagMaxElem (line 64)

The maximum number of chars for a tag

  • access: protected
Methods
Constructor __construct (line 73)

Constructor

  • access: public
void __construct ([numeric $p_tagmax = 10])
  • numeric $p_tagmax: - the number of characters allowed in a tag
CloseTag (line 129)

Returns true if $p_tag is a "<close tag>"

  • access: protected
boolean CloseTag (sting $p_tag, array $p_array)
  • sting $p_tag: - tag name
  • array $p_array: - tag array
expand_parameters (line 162)

Expands the paramteres that are kept in Href field

  • access: protected
string expand_parameters (struct $pResult)
  • struct $pResult
get_tags (line 234)

Parses a string and returnes an array of TAG - SRTING correspondent array

The result has the following structure: array( array (string1, tag1), array (string2, tag2), ... etc )

  • return: - the result array
  • access: public
array get_tags (string $p_str)
  • string $p_str: - the Input String
OpenTag (line 87)

Returns TRUE if the specified tag name is an "<open tag>", (it is not already opened)

  • access: protected
boolean OpenTag (string $p_tag, array $p_array)
  • string $p_tag: - tag name
  • array $p_array: - tag arrays
optimize_tags (line 184)

Optimizes the result of the tag result array In the result array there can be strings that are consecutive and have the same tag, they are concatenated.

  • return: - optimized result
  • access: protected
array optimize_tags (array $result)
  • array $result: - the array that has to be optimized

Documentation generated on Wed, 04 Feb 2009 22:01:34 +0100 by phpDocumentor 1.4.0a2