Differences between version 2 and previous revision of PhpDaoLib.
Other diffs: Previous Major Revision, Previous Author, or view the Annotated Edit History
Newer page: | version 2 | Last edited on Tuesday, August 20, 2002 10:32:50 pm | by PerryLorier | Revert |
Older page: | version 1 | Last edited on Tuesday, August 20, 2002 10:22:03 pm | by PerryLorier | Revert |
@@ -1,10 +1,75 @@
Perry wrote a Data Aware Object library. It's vaguely incomplete and buggy. However it needs some documentation, and using the wiki appeared to be the best way to write documentation for it.
-!!!Object DataSource
+!!!Object !
DataSource
-!Constructor: DataSource
+!Constructor: !
DataSource
Parameters:
+|__Position__|__name__|__type__|__description__
| 1 | db | Pear::DB class | database to work on
| 2 | table | string | name of the table to work on
| 3 | description | ordered associative array | see below
| 4 | prefs | order associative array | see below
+
+!Method: setInsert
+|__Position__|__name__|__type__|__description__
+| 1 | has_insert | boolean ''(defaults to true)''| if true, this has an insert row
+
+Display the insert row
+
+!Method: setWhere
+|__Position__|__name__|__type__|__description__
+| 1 | where | string | where clause to use to limit the display
+
+!Method: setFixed
+|__Position__|__name__|__type__|__description__
+| 1 | column | string | column name
+| 2 | value | string | value the column must have
+
+!Method: addDetail
+|__Position__|__name__|__type__|__description__
+| 1 | ourcolumn | string | the column in the master table
+| 2 | datasource | !DataSource | the data source to act as the detail
+| 3 | theircolumn | string | the column in the detail table that joins to "ourcolumn" in the master table
+
+!Method: doSelect
+''(internal)''
+
+!Method: widgetFactor
+''(internal, and probably needs rewriting :)''
+
+!Method: makeName
+''(internal)''
+
+!Method: build
+Rebuild the table. Must be called before update for some reason.
+
+!Method: execInsert
+''(internal)''
+
+!Method: execUpdate
+''(internal)''
+
+!Method: update
+Takes no parameters
+
+Must have build() called first for some reason.
+
+Returns an array of error strings of any problems found, or an empty array if no problems are found
+
+!Method: updateTrigger
+Takes no parameters
+
+Called on update, to be overridden.
+
+!!!Object: dao_table
+__Inherits from__: !DataSource
+
+Creates a table out of a !DataSource
+
+!Method: draw_cell
+''(internal)''
+
+!Method: display
+Takes no parameters
+
+displays the table. Expects build() to be called first