-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode.power
More file actions
174 lines (159 loc) · 3.14 KB
/
Copy pathcode.power
File metadata and controls
174 lines (159 loc) · 3.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
/**
* Hold a Input object for easier access to the input variables.
*
* @var Input
* @since 3.2.0
*/
protected Input $input;
/**
* Constructor
*
* @param Input|null $input Input
*
* @throws \Exception
* @since 3.2.0
*/
public function __construct(?Input $input = null)
{
$this->input = $input ?: Factory::getApplication()->getInput();
}
/**
* get type search being preformed
*
* @return int the search type 1 = search, 2 = search & replace
* @since 3.2.0
*/
protected function getTypesearch(): ?int
{
return $this->input->get('type_search', 1, 'INT');
}
/**
* get posted search value
*
* @return string|null Raw search value
* @since 3.2.0
*/
protected function getSearchvalue(): ?string
{
return $this->input->get('search_value', null, 'RAW');
}
/**
* get posted replace value
*
* @return string Raw replace value
* @since 3.2.0
*/
protected function getReplacevalue(): string
{
return $this->input->get('replace_value', '', 'RAW');
}
/**
* get posted search match case
*
* @return int Match case
* @since 3.2.0
*/
protected function getMatchcase(): int
{
return $this->input->get('match_case', 0, 'INT');
}
/**
* get posted search whole word
*
* @return int Whole word
* @since 3.2.0
*/
protected function getWholeword(): int
{
return $this->input->get('whole_word', 0, 'INT');
}
/**
* get posted search regex
*
* @return int Regex
* @since 3.2.0
*/
protected function getRegexsearch(): int
{
return $this->input->get('regex_search', 0, 'INT');
}
/**
* get posted component
*
* @return int Component ID
* @since 3.2.0
*/
protected function getComponentid(): int
{
return $this->input->get('component_id', 0, 'INT');
}
/**
* get posted area/table
*
* @return string|null Table name
* @since 3.2.0
*/
protected function getTablename(): ?string
{
return $this->input->get('table_name', null, 'word');
}
/**
* get posted field
*
* @return string|null Field name
* @since 3.2.0
*/
protected function getFieldname(): ?string
{
return $this->input->get('field_name', null, 'word');
}
/**
* get posted item id
*
* @return int Item id
* @since 3.2.0
*/
protected function getItemid(): int
{
return $this->input->get('item_id', 0, 'INT');
}
/**
* get field counter
*
* @return int we start at 0
* @since 3.2.0
*/
protected function getFieldcounter(): int
{
return 0;
}
/**
* get line counter
*
* @return int we start at 0
* @since 3.2.0
*/
protected function getLinecounter(): int
{
return 0;
}
/**
* get the start marker
*
* @return string The string to use as the start marker
* @since 3.2.0
*/
protected function getMarkerstart(): string
{
return '{+' . '|' . '=[';
}
/**
* get the end marker
*
* @return string The string to use as the end marker
* @since 3.2.0
*/
protected function getMarkerend(): string
{
return ']=' . '|' . '+}';
}