root/trunk/setups/katrin/classes/kdbfileidentifier.php

Revision trunk,187, 1.5 kB (checked in by Suren A. Chilingaryan <csa@dside.dyndns.org>, 6 months ago)

Updated Katrin configuration

Line 
1 <?php
2 // $Id: kdbrunidentifier.php 973 2009-08-19 09:40:28Z s_voec01 $
3 // Author: Sebastian Voecking <sebastian.voecking@uni-muenster.de>
4
5 ADEI::RequireClass("KDBRunIdentifier", true);
6
7 class KDBFileIdentifier
8 {
9     public $self = 0;
10
11     function __construct($arg1 = null, $arg2 = null)
12     {
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
27         $this->self = $r;
28     }
29
30     function SetRun(KDBRunIdentifier $run)
31     {
32         KDBFileIdentifier_SetRun($this->self, $run->self);
33     }
34
35     function GetRun()
36     {
37         $run = KDBFileIdentifier_GetRun($this->self);
38         return new KDBRunIdentifier($run);
39     }
40
41     function SetFileName($filename)
42     {
43         KDBFileIdentifier_SetFileName($this->self, $filename);
44     }
45
46     function GetFileName()
47     {
48         return KDBFileIdentifier_GetFileName($this->self);
49     }
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
61     function AsString()
62     {
63         return KDBFileIdentifier_AsString($this->self);
64     }
65 }
66
67 ?>
68
Note: See TracBrowser for help on using the browser.