diff options
author | Silvio <silvio@devlet.com.br> | 2010-03-30 15:41:42 -0300 |
---|---|---|
committer | Silvio <silvio@devlet.com.br> | 2010-03-30 15:41:42 -0300 |
commit | 2fc4b766f4422f6a58c0a535fadf99096e7a9ddd (patch) | |
tree | 62ac2cd98f59541d9dde04ca93404b7d433f0daf /classes/PhpIsisDb.php | |
parent | ed4a97748c2c9b76e45c69287d37f995da8fcbde (diff) | |
download | cinisis-2fc4b766f4422f6a58c0a535fadf99096e7a9ddd.tar.gz cinisis-2fc4b766f4422f6a58c0a535fadf99096e7a9ddd.tar.bz2 |
Adding doxygen
Diffstat (limited to 'classes/PhpIsisDb.php')
-rw-r--r-- | classes/PhpIsisDb.php | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/classes/PhpIsisDb.php b/classes/PhpIsisDb.php index 4e1aaf0..78c9cf0 100644 --- a/classes/PhpIsisDb.php +++ b/classes/PhpIsisDb.php @@ -4,9 +4,23 @@ * PHP-Isis implementation of IsisDb. */ class PhpIsisDb implements IsisDb { + /** + * @var $db + * Database resource. + */ var $db; + + /** + * @var $format + * Database format, derived from $schema. + */ var $format; + /** + * Constructor. + * + * @see IsisDb::__construct() + */ public function __construct($schema) { // Save db schema. $this->format = $schema; @@ -21,6 +35,11 @@ class PhpIsisDb implements IsisDb { $this->db = isis_open("db/$name/$name"); } + /** + * Read an entry. + * + * @see IsisDb::read() + */ public function read($id) { $results = isis_search('$', $this->db); if (!isis_data_seek($results, $id)) { @@ -30,15 +49,33 @@ class PhpIsisDb implements IsisDb { return $this->tag(isis_fetch_array($results)); } + /** + * Return number of rows in the database. + * + * @see IsisDb::rows() + */ public function rows() { return isis_last_mfn($this->db); } + /** + * Return a default example schema. + * + * @see IsisDb::default_schema() + */ public function default_schema() { return SchemaDb::default_schema(); } - // Tag results of a db query. + /** + * Tag results of a db query. + * + * @param $results + * Database query results. + * + * @return + * Tagged database result. + */ function tag($results) { foreach ($results as $key => $value) { if ($key != 'mfn') { |