File tree Expand file tree Collapse file tree 1 file changed +29
-1
lines changed Expand file tree Collapse file tree 1 file changed +29
-1
lines changed Original file line number Diff line number Diff line change 12
12
use Composer \Repository \RepositoryInterface ;
13
13
14
14
15
- class RepositoryConfig implements RepositoryConfigInterface {
15
+ class RepositoryConfig implements RepositoryConfigInterface, \ArrayAccess {
16
16
17
17
const repoType = null ;
18
18
protected $ config ;
@@ -135,4 +135,32 @@ function getRepo() {
135
135
return $ this ->repo ;
136
136
}
137
137
138
+ /**
139
+ * @see ArrayAccess
140
+ */
141
+ function offsetExists ( $ offset ) {
142
+ return isset ( $ this ->config [ $ offset ] );
143
+ }
144
+
145
+ /**
146
+ * @see ArrayAccess
147
+ */
148
+ function offsetGet ( $ offset ) {
149
+ return $ this ->get ( $ offset );
150
+ }
151
+
152
+ /**
153
+ * @see ArrayAccess
154
+ */
155
+ function offsetSet ( $ offset , $ value ) {
156
+ return $ this ->set ( $ offset , $ value );
157
+ }
158
+
159
+ /**
160
+ * @see ArrayAccess
161
+ */
162
+ function offsetUnset ( $ offset ) {
163
+ unset( $ this ->config [ $ offset ] );
164
+ }
165
+
138
166
}
You can’t perform that action at this time.
0 commit comments