Zeta Components - high quality PHP components

Zeta Components Manual :: Docs For Class ezcTreeDbExternalTableDataStore

TreeDatabaseTiein::ezcTreeDbExternalTableDataStore

Class ezcTreeDbExternalTableDataStore

ezcTreeDbExternalTableDataStore is an implementation of a tree node data store that uses an external table to store data in.

Source for this file: /TreeDatabaseTiein/src/stores/db_external.php

Implements interfaces:

Version:   //autogentag//

Member Variables

protected DOMDocument $dom
Contains the DOM representing this tree this data store stores data for.

Method Summary

public ezcTreeDbExternalTableDataStore __construct( $dbHandler , $dataTable , $idField , [ $dataField = null] )
Constructs a new storage backend that stores data in a table external from the node tree.
public void deleteDataForAllNodes( )
Deletes the data for all the nodes in the store.
public void deleteDataForNodes( $nodeList )
Deletes the data for all the nodes in the node list $nodeList.
public void fetchDataForNode( $node )
Retrieves the data for the node $node from the data store and assigns it to the node's 'data' property.
public void fetchDataForNodes( $nodeList )
This method *tries* to fetch the data for all the nodes in the node list $nodeList and assigns this data to the nodes' 'data' properties.
public void setDomTree( $dom )
Associates the DOM tree for which this data store stores data for with this store.
public void storeDataForNode( $node )
Stores the data in the node to the data store.

Methods

__construct

ezcTreeDbExternalTableDataStore __construct( $dbHandler , string $dataTable , string $idField , [string $dataField = null] )

Constructs a new storage backend that stores data in a table external from the node tree.

The store will use the database connection specified by $dbHandler, and the table $dataTable to store the data in. The lookup field that is matched against the node ID is specified with $idField. By default the store will return the whole row unless a specific field has been configured through the $dataField argument in this constructor.

Parameters:
Name Type Description
$dbHandler ezcDbHandler
$dataTable string
$idField string
$dataField string

deleteDataForAllNodes

void deleteDataForAllNodes( )

Deletes the data for all the nodes in the store.

Implementation of:
Method Description
ezcTreeDataStore::deleteDataForAllNodes() Deletes the data for all the nodes in the store.

deleteDataForNodes

void deleteDataForNodes( $nodeList )

Deletes the data for all the nodes in the node list $nodeList.

Parameters:
Name Type Description
$nodeList ezcTreeNodeList
Implementation of:
Method Description
ezcTreeDataStore::deleteDataForNodes() Deletes the data for all the nodes in the node list $nodeList.

fetchDataForNode

void fetchDataForNode( $node )

Retrieves the data for the node $node from the data store and assigns it to the node's 'data' property.

Parameters:
Name Type Description
$node ezcTreeNode
Implementation of:
Method Description
ezcTreeDataStore::fetchDataForNode() Retrieves the data for the node $node from the data store and assigns it to the node's 'data' property.

fetchDataForNodes

void fetchDataForNodes( $nodeList )

This method *tries* to fetch the data for all the nodes in the node list $nodeList and assigns this data to the nodes' 'data' properties.

Parameters:
Name Type Description
$nodeList ezcTreeNodeList
Implementation of:
Method Description
ezcTreeDataStore::fetchDataForNodes() Retrieves the data for all the nodes in the node list $nodeList and assigns this data to the nodes' 'data' properties.

setDomTree

void setDomTree( $dom )

Associates the DOM tree for which this data store stores data for with this store.

This method is only needed for when a data store is used with an XML based tree backend. XML based tree backends call this method to associate the DOM tree with the store. This is not needed for this data store so the method is a no-op.

Parameters:
Name Type Description
$dom DOMDocument

storeDataForNode

void storeDataForNode( $node )

Stores the data in the node to the data store.

Parameters:
Name Type Description
$node ezcTreeNode
Implementation of:
Method Description
ezcTreeDataStore::storeDataForNode() Stores the data in the node to the data store.
Documentation generated by phpDocumentor 1.4.3