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

Class: HTML_Template_Flexy_Tree

Source Location: /HTML_Template_Flexy-1.3.13/HTML/Template/Flexy/Tree.php

Class Overview




Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 35]


[ Top ]


Class Variables

$options = array(
        'ignore'        => false, // was flexyIgnore
        'filename'      => false,
        'ignore_html'   => false,
        'ignore_php'    => true,
    )

[line 45]

Options for Tree: 'ignore' => dont change {xxxX} into placeholders? 'filename' => filename of file being parsed. (for error messages.) 'ignore_html' => return <html> elements as strings.

'ignore_php' => DELETE/DESTROY any php code in the original template.


Type:   mixed


[ Top ]

$strings = array()

[line 78]


Type:   mixed


[ Top ]

$tokens = array()

[line 77]

Array of all tokens (eg. nodes / text / tags etc. ) All nodes have ID's

eg. some text [0] => Token_Tag:: tagname = '' children = array( &tag[1] ); [1] => Token_Text::'some test' [2] => Token_Tag:: tagname = '';

under normal situations, the tree is built into node[0], the remaining nodes are referenced by alias. if caching is used (the nodes > 0 will not exist, and everything will just be a child of node 0.

  • Access: public

Type:   array


[ Top ]



Method Detail

buildChildren   [line 278]

void buildChildren( int $id)

Build the child array for each element.

RECURSIVE FUNCTION!!!!

does not move tokens, just aliases the child nodes into the token array.

  • Access: public

Parameters:

int   $id   —  id of node to add children to.

[ Top ]

construct   [line 97]

base construct( string $data, [array $options = array()])

Run a Tokenizer and Store its results and return the tree.

It should build a DOM Tree of the HTML

  • Return: token (really a dummy token, which contains the tree)
  • Access: public

Parameters:

string   $data   —  data to parse.
array   $options   —  see options array.

[ Top ]

matchClosers   [line 195]

none matchClosers( )

Match the opening and closing tags eg. </B> is the closer of

aliases the ->close to the tokens[{closeid}] element

  • Access: public

[ Top ]

returnStart   [line 314]

HTML_Template_Flexy_Token returnStart( )

Locates Flexy:startchildren etc. if it is used.

and returns the base of the tree. (eg. otherwise token[0].

  • Return: (base of tree.)
  • Access: public

[ Top ]

tokenize   [line 139]

none tokenize( string $data)

The core tokenizing part - runs the tokenizer on the data, and stores the results in $this->tokens[]
  • Return: | PEAR::Error
  • See: see also methods.....

Parameters:

string   $data   —  Data to tokenize

[ Top ]


Documentation generated on Mon, 11 Mar 2019 16:00:04 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.