/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/kdbfileidentifier.php

  • Committer: Suren A. Chilingaryan
  • Date: 2010-02-24 03:02:44 UTC
  • Revision ID: csa@dside.dyndns.org-20100224030244-8lb5hmrvr777vcw5
Updated Katrin configuration

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
class KDBFileIdentifier
8
8
{
9
9
    public $self = 0;
10
 
    
11
 
    function __construct($arg1, $arg2 = null)
 
10
 
 
11
    function __construct($arg1 = null, $arg2 = null)
12
12
    {
13
 
        switch (func_num_args()) {
14
 
        case 1:
15
 
            $r = new_KDBFileIdentifier($arg1);
16
 
            break;
17
 
        default:
18
 
            $r = new_KDBFileIdentifier($arg1->GetName() . "/" . $arg2);
19
 
        }
 
13
        if (!extension_loaded("kdbphp")) {
 
14
            throw new ADEIException("KDBPhp extension is not loaded!");
 
15
        }
 
16
 
 
17
        $r = new_KDBFileIdentifier();
 
18
 
 
19
        if (func_num_args() == 1) {
 
20
            KDBFileIdentifier_SetFileName($arg1);
 
21
        }
 
22
        elseif (func_num_args() == 2) {
 
23
            KDBFileIdentifier_SetRun($arg1);
 
24
            KDBFileIdentifier_SetFileName($arg2);
 
25
        }
 
26
 
20
27
        $this->self = $r;
21
28
    }
22
 
    
 
29
 
 
30
    function SetRun(KDBRunIdentifier $run)
 
31
    {
 
32
        KDBFileIdentifier_SetRun($this->self, $run->self);
 
33
    }
 
34
 
23
35
    function GetRun()
24
36
    {
25
37
        $run = KDBFileIdentifier_GetRun($this->self);
26
38
        return new KDBRunIdentifier($run);
27
39
    }
28
 
    
 
40
 
 
41
    function SetFileName($filename)
 
42
    {
 
43
        KDBFileIdentifier_SetFileName($this->self, $filename);
 
44
    }
 
45
 
29
46
    function GetFileName()
30
47
    {
31
48
        return KDBFileIdentifier_GetFileName($this->self);
32
49
    }
33
 
    
 
50
 
 
51
    function SetFileType($type)
 
52
    {
 
53
        KDBFileIdentifier_SetFileType($this->self, $type);
 
54
    }
 
55
 
 
56
    function GetFileType()
 
57
    {
 
58
        return KDBFileIdentifier_GetFileType($this->self);
 
59
    }
 
60
 
34
61
    function AsString()
35
62
    {
36
63
        return KDBFileIdentifier_AsString($this->self);