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
Version: | //autogentag// |
protected DOMDocument |
$dom
Contains the DOM representing this tree this data store stores data for. |
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. |
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.
Name | Type | Description |
---|---|---|
$dbHandler |
ezcDbHandler | |
$dataTable |
string | |
$idField |
string | |
$dataField |
string |
Deletes the data for all the nodes in the store.
Method | Description |
---|---|
ezcTreeDataStore::deleteDataForAllNodes() |
Deletes the data for all the nodes in the store. |
Deletes the data for all the nodes in the node list $nodeList.
Name | Type | Description |
---|---|---|
$nodeList |
ezcTreeNodeList |
Method | Description |
---|---|
ezcTreeDataStore::deleteDataForNodes() |
Deletes the data for all the nodes in the node list $nodeList. |
Retrieves the data for the node $node from the data store and assigns it to the node's 'data' property.
Name | Type | Description |
---|---|---|
$node |
ezcTreeNode |
Method | Description |
---|---|
ezcTreeDataStore::fetchDataForNode() |
Retrieves the data for the node $node from the data store and assigns it to the node's 'data' property. |
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.
Name | Type | Description |
---|---|---|
$nodeList |
ezcTreeNodeList |
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. |
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.
Name | Type | Description |
---|---|---|
$dom |
DOMDocument |
Stores the data in the node to the data store.
Name | Type | Description |
---|---|---|
$node |
ezcTreeNode |
Method | Description |
---|---|
ezcTreeDataStore::storeDataForNode() |
Stores the data in the node to the data store. |