diff options
author | Silvio <silvio@devlet.com.br> | 2010-04-08 18:18:33 -0300 |
---|---|---|
committer | Silvio <silvio@devlet.com.br> | 2010-04-08 18:18:33 -0300 |
commit | 1996dbfb572285bbba3805fe9073d62a736615c2 (patch) | |
tree | 63867eb1c26a117b4e03b50594fede383777efcc /classes/BiblioIsisDb.php | |
parent | 5288d2bd1572f6c1f59ba87bb111ba9344f2f9a9 (diff) | |
download | cinisis-1996dbfb572285bbba3805fe9073d62a736615c2.tar.gz cinisis-1996dbfb572285bbba3805fe9073d62a736615c2.tar.bz2 |
Adding BiblioIsisDb skeleton
Diffstat (limited to 'classes/BiblioIsisDb.php')
-rw-r--r-- | classes/BiblioIsisDb.php | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/classes/BiblioIsisDb.php b/classes/BiblioIsisDb.php new file mode 100644 index 0000000..35404bb --- /dev/null +++ b/classes/BiblioIsisDb.php @@ -0,0 +1,90 @@ +<?php + +/** + * Biblio::Isis implementation of IsisDb. + */ +class BiblioIsisDb implements IsisDb { + /** + * @var $fdt + * Field description table. + */ + var $fdt; + + /** + * @var $db + * Database resource. + */ + var $db; + + /** + * @var $format + * Database format, derived from $schema. + */ + var $format; + + /** + * Constructor. + * + * @see IsisDb::__construct() + */ + public function __construct($schema) { + } + + /** + * Read an entry. + * + * @see IsisDb::read() + * + * @todo + * Subfields. + */ + public function read($id) { + } + + /** + * Return number of rows in the database. + * + * The Malete API doen't implement such feature so we + * have to emulate it by iterating over all entries + * until MaleteDb::read() returns FALSE. + * + * @see IsisDb::read() + */ + public function rows() { + } + + /** + * Return an example schema. + * + * @see IsisDb::example() + */ + public function example() { + return SchemaDb::example(); + } + + /** + * Check configuration. + * + * @see IsisDb::check() + */ + public function check($schema, $section = NULL) { + return SchemaDb::check($schema, $section); + } + + /** + * Tag results of a db query. + * + * This function converts the keys of query result from field numbers + * to names and and also puts repetition fields into place as Malete + * deals with field repetition by using a 'tag' property in the resulting + * query object. + * + * @param $results + * Database query results. + * + * @return + * Tagged database result. + */ + function tag($results) { + } +} |