/dev/trunk

To get this branch, use:
bzr branch http://darksoft.org/webbzr/dev/trunk

« back to all changes in this revision

Viewing changes to setups/katrin/classes/kdbconstants.php

  • Committer: Suren A. Chilingaryan
  • Date: 2010-08-13 14:18:27 UTC
  • Revision ID: csa@dside.dyndns.org-20100813141827-u3o97425ppvd5g7y
Revert back to SetConfiguration from SetCustomProperties while handling certain property in search; trully support HTML content in description field within search results; support execution in XMLModule; support for setup-specific javascript code; KATRIN update

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
define('kHardwareIpe4', 2);
17
17
define('kHardwareInvalid', 3);
18
18
 
 
19
define("kSystemMainSpec", 0);
 
20
define("kSystemPreSpec", 1);
 
21
define("kSystemInvalid", 2);
 
22
 
19
23
class KDBConstants
20
24
{
21
25
    private static $gTypeNames = array(
33
37
        kHardwareIpe3 => 'ipe3',
34
38
        kHardwareIpe4 => 'ipe4',
35
39
        kHardwareInvalid => 'invalid');
 
40
 
 
41
    private static $gSystemNames = array(
 
42
        kSystemMainSpec => 'kms',
 
43
        kSystemPreSpec => 'kps',
 
44
        kSystemInvalid => 'xxx');
36
45
    
37
46
    static function FileTypeName($value)
38
47
    {
71
80
            throw new ADEIException("Unknown hardware '$type'");
72
81
        }
73
82
    }
 
83
    
 
84
    static function OrcaSystemName($value)
 
85
    {
 
86
        if (array_key_exists($value, self::$gSystemNames)) {
 
87
            return self::$gSystemNames[$value];
 
88
        }
 
89
        else {
 
90
            throw new ADEIException("Unknown Orca system $value");
 
91
        }
 
92
    }
 
93
 
 
94
    static function OrcaSystemValue($type) {
 
95
        if ($value = array_search($type, self::$gSystemNames)) {
 
96
            return $value;
 
97
        }
 
98
        else {
 
99
            throw new ADEIException("Unknown Orca system '$type'");
 
100
        }
 
101
    }
74
102
}
75
103
?>