aboutsummaryrefslogtreecommitdiff
path: root/interface.php
blob: f5802d7fff8896455d8ae3f3dacad4699339b67d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php

/**
 * Generic interface for reading Isis databases.
 */
interface IsisDb {
  /**
   * Constructor.
   *
   * @param $schema
   *   High level database schema description.
   *
   * @see default_schema()
   */
  public function __construct($schema);

  /**
   * Read an entry.
   *
   * @param $id
   *   Database row id.
   */
  public function read($id);

  /**
   * Return number of rows in the database.
   *
   * @return
   *   Number of rows in the database.
   */
  public function rows();

  /**
   * Return a default example schema.
   *
   * @return
   *   Array with a sample database schema.
   */
  public function default_schema();
}