1 | <?php |
||
14 | class VirtualLib { |
||
15 | const SQL_VL_KEY = "virtual_libraries"; // Key for the virtual library entries. |
||
16 | |||
17 | /** |
||
18 | * Checks if the support for virtual libraries is enabled in the settings. |
||
19 | * |
||
20 | * @return boolean true, if virtual libraries are enabled. |
||
21 | */ |
||
22 | 41 | public static function isVLEnabled() { |
|
26 | |||
27 | /** |
||
28 | * Gets a list of all virtual libraries in a database. |
||
29 | * |
||
30 | * @param int $database id of the database |
||
31 | * @return array An array of virtual libraries with the names as keys and the filter strings as values. |
||
32 | */ |
||
33 | 22 | public static function getVLList($database = NULL) { |
|
42 | |||
43 | /** |
||
44 | * Gets a list of all virtual libraries in a database. |
||
45 | * |
||
46 | * @param int $database id of the database |
||
47 | * @return array An array of virtual libraries with the names as keys and the filter strings as values. |
||
48 | */ |
||
49 | 22 | public static function getVLNameList($database = NULL) { |
|
52 | |||
53 | /** |
||
54 | * Combines the database and virtual lib names into a merged name. |
||
55 | * |
||
56 | * The resulting name has the form "{$dbName} - {$vlName}". If one of these parameters is empty, the dash will also be removed. |
||
57 | * If the support for virtual libraries is not enabled, this function simply returns the database name. |
||
58 | * |
||
59 | * @param string $dbName The Database Name |
||
60 | * @param string $vlName The Name of the virtual library |
||
61 | */ |
||
62 | 1 | public static function getDisplayName($dbName, $vlName) { |
|
68 | } |