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

Class: TeraWurflPDONestedSet

Source Location: /DatabaseConnectors/TeraWurflPDONestedSet.php

Class Overview


Takes an existing table with data in ancestor..descendent hierarchial format and ALTERs the table by adding a right and left (`rt` and `lt`) columns. These columns contain the nested set relationships between the nodes. This makes certain lookups (like fallback trees) extremely simple and very fast.


Variables

Methods



Class Details

[line 28]
Takes an existing table with data in ancestor..descendent hierarchial format and ALTERs the table by adding a right and left (`rt` and `lt`) columns. These columns contain the nested set relationships between the nodes. This makes certain lookups (like fallback trees) extremely simple and very fast.

This class is used by Tera-WURFL's MySQL5 Nested Set Database Connector




[ Top ]


Class Variables

$child_query =

[line 43]



Tags:

access:  protected

Type:   mixed


[ Top ]

$column_left =

[line 41]



Tags:

access:  protected

Type:   mixed


[ Top ]

$column_node_id =

[line 39]



Tags:

access:  protected

Type:   mixed


[ Top ]

$column_parent_id =

[line 40]



Tags:

access:  protected

Type:   mixed


[ Top ]

$column_right =

[line 42]



Tags:

access:  protected

Type:   mixed


[ Top ]

$dbcon =

[line 35]



Tags:

access:  protected

Type:   mixed


[ Top ]

$index_table =

[line 38]



Tags:

access:  protected

Type:   mixed


[ Top ]

$left =

[line 36]



Tags:

access:  protected

Type:   mixed


[ Top ]

$max_level =  100

[line 34]

How deeply the recursion can go into the tree



Tags:

access:  protected

Type:   int


[ Top ]

$numQueries =  0

[line 46]



Tags:

access:  public

Type:   mixed


[ Top ]

$source_table =

[line 37]



Tags:

access:  protected

Type:   mixed


[ Top ]

$update_query =

[line 44]



Tags:

access:  protected

Type:   mixed


[ Top ]



Class Methods


constructor __construct [line 48]

TeraWurflPDONestedSet __construct( PDO &$dbcon, $source_table, $index_table, $column_node_id, $column_parent_id, [ $column_left = 'lt'], [ $column_right = 'rt'])



Tags:

access:  public


Parameters:

PDO   &$dbcon  
   $source_table  
   $index_table  
   $column_node_id  
   $column_parent_id  
   $column_left  
   $column_right  

[ Top ]

method addColumns [line 110]

void addColumns( )



Tags:

access:  public


[ Top ]

method addIndices [line 119]

void addIndices( )



Tags:

access:  public


[ Top ]

method dropColumns [line 102]

void dropColumns( )



Tags:

access:  public


[ Top ]

method generateNestedSet [line 57]

void generateNestedSet( [ $root_node_id = 'generic'])



Tags:

access:  public


Parameters:

   $root_node_id  

[ Top ]

method processChildren [line 127]

void processChildren( $node_id, $level)



Tags:

access:  protected


Parameters:

   $node_id  
   $level  

[ Top ]

method queryGetAncestors [line 77]

void queryGetAncestors( $id, [ $order = "ASC"])



Tags:

access:  public


Parameters:

   $id  
   $order  

[ Top ]


Documentation generated on Thu, 03 Oct 2013 15:19:20 -0400 by phpDocumentor 1.4.4