@@ -43,7 +43,7 @@ function __construct() {
43
43
/**
44
44
* @return RootDirCollection
45
45
*/
46
- protected function _rootCollection () {
46
+ public function rootCollection () {
47
47
return $ this ->_rootDirCollection ;
48
48
}
49
49
@@ -53,7 +53,7 @@ protected function _rootCollection() {
53
53
* @return RootDir|false
54
54
*/
55
55
public function addRootDir (RootDir $ rootDir , $ index = null ) {
56
- $ rootDir = $ this ->_rootCollection ()->addRootDir ($ rootDir , $ index );
56
+ $ rootDir = $ this ->rootCollection ()->addRootDir ($ rootDir , $ index );
57
57
return $ this ->isValid () === true ? $ rootDir : false ;
58
58
}
59
59
@@ -62,85 +62,85 @@ public function addRootDir(RootDir $rootDir, $index = null) {
62
62
* @return bool
63
63
*/
64
64
public function removeRootDir (RootDir $ rootDir ) {
65
- return $ this ->_rootCollection ()->removeDir ($ rootDir );
65
+ return $ this ->rootCollection ()->removeDir ($ rootDir );
66
66
}
67
67
/**
68
68
* @param string $id
69
69
* @return bool
70
70
*/
71
71
public function removeRootDirById ($ id ) {
72
- return $ this ->_rootCollection ()->removeDirById ($ id );
72
+ return $ this ->rootCollection ()->removeDirById ($ id );
73
73
}
74
74
/**
75
75
* @param int $index
76
76
* @return bool
77
77
*/
78
78
public function removeRootDirAtIndex ($ index ) {
79
- return $ this ->_rootCollection ()->removeDirAtIndex ($ index );
79
+ return $ this ->rootCollection ()->removeDirAtIndex ($ index );
80
80
}
81
81
public function removeAllRootDirs () {
82
- $ this ->_rootCollection ()->removeAllDirs ();
82
+ $ this ->rootCollection ()->removeAllDirs ();
83
83
}
84
84
85
85
/**
86
86
* @return RootDir[]
87
87
*/
88
88
public function rootDirs () {
89
- return $ this ->_rootCollection ()->dirs ();
89
+ return $ this ->rootCollection ()->dirs ();
90
90
}
91
91
92
92
/**
93
93
* @param RootDir $rootDir RootDir that will be checked
94
94
* @return bool Returns true if RootDir is part of this files instance
95
95
*/
96
96
public function containsRootDir (RootDir $ rootDir ) {
97
- return $ this ->_rootCollection ()->isInCollection ($ rootDir );
97
+ return $ this ->rootCollection ()->isInCollection ($ rootDir );
98
98
}
99
99
100
100
/**
101
101
* @return int Total root directories
102
102
*/
103
103
public function totalRootDirs () {
104
- return $ this ->_rootCollection ()->totalDirs ();
104
+ return $ this ->rootCollection ()->totalDirs ();
105
105
}
106
106
107
107
/**
108
108
* @param string|RootDir $rootDir
109
109
* @return RootDir|null
110
110
*/
111
111
public function getRootDir ($ rootDir ) {
112
- return $ this ->_rootCollection ()->getDir ($ rootDir );
112
+ return $ this ->rootCollection ()->getDir ($ rootDir );
113
113
}
114
114
115
115
/**
116
116
* @param string $id
117
117
* @return null|RootDir
118
118
*/
119
119
public function getRootDirById ($ id ) {
120
- return $ this ->_rootCollection ()->getDirById ($ id );
120
+ return $ this ->rootCollection ()->getDirById ($ id );
121
121
}
122
122
123
123
/**
124
124
* @param int $index
125
125
* @return RootDir|false
126
126
*/
127
127
public function getRootDirByIndex ($ index ) {
128
- return $ this ->_rootCollection ()->getDirByIndex ($ index );
128
+ return $ this ->rootCollection ()->getDirByIndex ($ index );
129
129
}
130
130
131
131
/**
132
132
* @return string[]
133
133
*/
134
134
public function getRootPaths () {
135
- return $ this ->_rootCollection ()->getPaths ();
135
+ return $ this ->rootCollection ()->getPaths ();
136
136
}
137
137
138
138
139
139
140
140
/**
141
141
* @return ChildDirCollection
142
142
*/
143
- protected function _childCollection () {
143
+ public function childCollection () {
144
144
return $ this ->_childDirCollection ;
145
145
}
146
146
@@ -150,7 +150,7 @@ protected function _childCollection() {
150
150
* @return ChildDir|false
151
151
*/
152
152
public function addChildDir (ChildDir $ childDir , $ index = null ) {
153
- $ childDir = $ this ->_childCollection ()->addChildDir ($ childDir , $ index );
153
+ $ childDir = $ this ->childCollection ()->addChildDir ($ childDir , $ index );
154
154
return $ this ->isValid () === true ? $ childDir : false ;
155
155
}
156
156
@@ -159,77 +159,77 @@ public function addChildDir(ChildDir $childDir, $index = null) {
159
159
* @return bool
160
160
*/
161
161
public function removeChildDir (ChildDir $ childDir ) {
162
- return $ this ->_childCollection ()->removeDir ($ childDir );
162
+ return $ this ->childCollection ()->removeDir ($ childDir );
163
163
}
164
164
/**
165
165
* @param string $id
166
166
* @return bool
167
167
*/
168
168
public function removeChildDirById ($ id ) {
169
- return $ this ->_childCollection ()->removeDirById ($ id );
169
+ return $ this ->childCollection ()->removeDirById ($ id );
170
170
}
171
171
/**
172
172
* @param int $index
173
173
* @return bool
174
174
*/
175
175
public function removeChildDirAtIndex ($ index ) {
176
- return $ this ->_childCollection ()->removeDirAtIndex ($ index );
176
+ return $ this ->childCollection ()->removeDirAtIndex ($ index );
177
177
}
178
178
public function removeAllChildDirs () {
179
- $ this ->_childCollection ()->removeAllDirs ();
179
+ $ this ->childCollection ()->removeAllDirs ();
180
180
}
181
181
182
182
/**
183
183
* @return ChildDir[]
184
184
*/
185
185
public function childDirs () {
186
- return $ this ->_childCollection ()->dirs ();
186
+ return $ this ->childCollection ()->dirs ();
187
187
}
188
188
189
189
/**
190
190
* @param ChildDir $childDir Dir that will be checked
191
191
* @return bool Returns true if dir is part of this files instance
192
192
*/
193
193
public function containsChildDir (ChildDir $ childDir ) {
194
- return $ this ->_childCollection ()->isInCollection ($ childDir );
194
+ return $ this ->childCollection ()->isInCollection ($ childDir );
195
195
}
196
196
197
197
/**
198
198
* @return int Total child directories
199
199
*/
200
200
public function totalChildDirs () {
201
- return $ this ->_childCollection ()->totalDirs ();
201
+ return $ this ->childCollection ()->totalDirs ();
202
202
}
203
203
204
204
/**
205
205
* @param string|ChildDir $childDir
206
206
* @return null|ChildDir
207
207
*/
208
208
public function getChildDir ($ childDir ) {
209
- return $ this ->_childCollection ()->getDir ($ childDir );
209
+ return $ this ->childCollection ()->getDir ($ childDir );
210
210
}
211
211
212
212
/**
213
213
* @param string $id
214
214
* @return null|ChildDir
215
215
*/
216
216
public function getChildDirById ($ id ) {
217
- return $ this ->_childCollection ()->getDirById ($ id );
217
+ return $ this ->childCollection ()->getDirById ($ id );
218
218
}
219
219
220
220
/**
221
221
* @param int $index
222
222
* @return ChildDir|false
223
223
*/
224
224
public function getChildDirByIndex ($ index ) {
225
- return $ this ->_childCollection ()->getDirByIndex ($ index );
225
+ return $ this ->childCollection ()->getDirByIndex ($ index );
226
226
}
227
227
228
228
/**
229
229
* @return string[]
230
230
*/
231
231
public function getChildPaths () {
232
- return $ this ->_childCollection ()->getPaths ();
232
+ return $ this ->childCollection ()->getPaths ();
233
233
}
234
234
235
235
/**
0 commit comments