summaryrefslogtreecommitdiffstats
path: root/src/datasets
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2007-04-12 08:22:59 +0000
committerKore Nordmann <github@kore-nordmann.de>2007-04-12 08:22:59 +0000
commit316e509e2715f72a37ad0fea7131ea8d17ea1578 (patch)
treefff752738755078141acd104fa13e7bd4e45a399 /src/datasets
parent4a8c988ef8c41d2989497792dec16886e85ab687 (diff)
downloadzetacomponents-graph-316e509e2715f72a37ad0fea7131ea8d17ea1578.zip
zetacomponents-graph-316e509e2715f72a37ad0fea7131ea8d17ea1578.tar.gz
- Fixed issue #10584: API Doc for ezcGraphPdoDataSet::createFromPdo() is wrong
Diffstat (limited to 'src/datasets')
-rw-r--r--src/datasets/pdo.php35
1 files changed, 31 insertions, 4 deletions
diff --git a/src/datasets/pdo.php b/src/datasets/pdo.php
index f4331cc..0da65bd 100644
--- a/src/datasets/pdo.php
+++ b/src/datasets/pdo.php
@@ -18,7 +18,22 @@ class ezcGraphPdoDataSet extends ezcGraphDataSet
/**
* Constructor
*
+ * Creates a ezcGraphPdoDataSet from a PDOStatement and uses the columns
+ * defined in the definition array as keys and values for the data set.
+ *
+ * If the definition array is empty a single column will be used as values,
+ * with two columns the first column will be used for the keys and the
+ * second for the data set values.
+ *
+ * You may define the name of the rows used for keys and values by using
+ * an array like:
+ * array (
+ * ezcGraph::KEY => 'row name',
+ * ezcGraph::VALUE => 'row name',
+ * );
+ *
* @param PDOStatement $statement
+ * @param array $definition
* @return ezcGraphPdoDataSet
*/
public function __construct( PDOStatement $statement, array $definition = null )
@@ -30,12 +45,24 @@ class ezcGraphPdoDataSet extends ezcGraphDataSet
}
/**
- * setData
+ * Create dataset from PDO statement
*
- * Can handle data provided through an array or iterator.
+ * This methods uses the values from a PDOStatement to fill up the data
+ * sets data.
+ *
+ * If the definition array is empty a single column will be used as values,
+ * with two columns the first column will be used for the keys and the
+ * second for the data set values.
+ *
+ * You may define the name of the rows used for keys and values by using
+ * an array like:
+ * array (
+ * ezcGraph::KEY => 'row name',
+ * ezcGraph::VALUE => 'row name',
+ * );
*
- * @param array|Iterator $data
- * @access public
+ * @param PDOStatement $statement
+ * @param array $definition
* @return void
*/
protected function createFromPdo( PDOStatement $statement, array $definition = null )
OpenPOWER on IntegriCloud