File tree Expand file tree Collapse file tree 1 file changed +38
-1
lines changed Expand file tree Collapse file tree 1 file changed +38
-1
lines changed Original file line number Diff line number Diff line change 1515 * Class Model
1616 * @package Connect
1717 */
18- class Model
18+ class Model implements \ArrayAccess
1919{
2020 /**
2121 * Required properties, if the object is instantiated without
@@ -298,6 +298,43 @@ public function toJSON($pretty = false)
298298 return json_encode ($ this ->toArray (), $ pretty ? JSON_PRETTY_PRINT : null );
299299 }
300300
301+ /**
302+ * @param mixed $offset
303+ * @param mixed $value
304+ */
305+ public function offsetSet ($ offset , $ value )
306+ {
307+ $ this ->set ($ offset , $ value );
308+ }
309+
310+ /**
311+ * @param mixed $offset
312+ * @return bool
313+ */
314+ public function offsetExists ($ offset )
315+ {
316+ return isset ($ this ->{$ offset });
317+ }
318+
319+ /**
320+ * @param mixed $offset
321+ */
322+ public function offsetUnset ($ offset )
323+ {
324+ unset($ this ->{$ offset });
325+ }
326+
327+ /**
328+ * @param mixed $offset
329+ * @return mixed|null
330+ */
331+ public function offsetGet ($ offset )
332+ {
333+ return isset ($ this ->{$ offset })
334+ ? $ this ->get ($ offset )
335+ : null ;
336+ }
337+
301338 /**
302339 * Debug method
303340 * @return array
You can’t perform that action at this time.
0 commit comments