1
<?php
2
/**
3
 * Class for collecting details for setting values in ini file
4
 *
5
 * Based on http://ant-contrib.sourceforge.net/tasks/tasks/inifile.html
6
 *
7
 * PHP version 5
8
 *
9
 * @category Tasks
10
 * @package  phing.tasks.ext
11
 * @author   Ken Guest <kguest@php.net>
12
 * @license  LGPL v3 or later http://www.gnu.org/licenses/lgpl.html
13
 * @link     http://www.phing.info/
14
 */
15

16
/**
17
 * InifileSet
18
 *
19
 * @category Tasks
20
 * @package  phing.tasks.ext
21
 * @author   Ken Guest <ken@linux.ie>
22
 * @license  LGPL (see http://www.gnu.org/licenses/lgpl.html)
23
 * @link     InifileSet.php
24
 */
25
class IniFileSet
26
{
27
    /**
28
     * Property
29
     *
30
     * @var string
31
     */
32
    protected $property = null;
33

34
    /**
35
     * Section
36
     *
37
     * @var string
38
     */
39
    protected $section = null;
40

41
    /**
42
     * Value
43
     *
44
     * @var mixed
45
     */
46
    protected $value = null;
47

48
    /**
49
     * Operation
50
     *
51
     * @var mixed
52
     */
53
    protected $operation = null;
54

55
    /**
56
     * Set Operation
57
     *
58
     * @param string $operation +/-
59
     *
60
     * @return void
61
     */
62 0
    public function setOperation($operation)
63
    {
64 0
        $this->operation = $operation;
65
    }
66

67
    /**
68
     * Get Operation
69
     *
70
     * @return void
71
     */
72 1
    public function getOperation()
73
    {
74 1
        return $this->operation;
75
    }
76

77
    /**
78
     * Set Section name
79
     *
80
     * @param string $section Name of section in ini file
81
     *
82
     * @return void
83
     */
84 1
    public function setSection($section)
85
    {
86 1
        $this->section = trim($section);
87
    }
88

89
    /**
90
     * Set Property
91
     *
92
     * @param string $property property/key name
93
     *
94
     * @return void
95
     */
96 1
    public function setProperty($property)
97
    {
98 1
        $this->property = $property;
99
    }
100

101
    /**
102
     * Set Value
103
     *
104
     * @param string $value Value to set for key in ini file
105
     *
106
     * @return void
107
     */
108 1
    public function setValue($value)
109
    {
110 1
        $this->value = $value;
111
    }
112

113
    /**
114
     * Get Property
115
     *
116
     * @return string
117
     */
118 1
    public function getProperty()
119
    {
120 1
        return $this->property;
121
    }
122

123
    /**
124
     * Get Value
125
     *
126
     * @return string
127
     */
128 1
    public function getValue()
129
    {
130 1
        return $this->value;
131
    }
132
    /**
133
     * Get Section
134
     *
135
     * @return string
136
     */
137 1
    public function getSection()
138
    {
139 1
        return $this->section;
140
    }
141
}

Read our documentation on viewing source code .

Loading