PluginProbe
Media Cloud Sync / 1.4.2
Media Cloud Sync v1.4.2
1.4.2 1.4.1 1.4.0 1.3.12 1.3.11 1.3.10 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.2.0 1.2.10 1.2.11 1.2.12 1.2.13 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 All 36 releases
← All changes | includes/sdk/s3/Aws/Api/ShapeMap.php +34 -1 1.2.0 → 1.4.2 View file →
@@ -4,9 +4,9 @@
4 4
5 5 /**
6 6 * Builds shape based on shape references.
7 7 */
8 -class ShapeMap
8 +class ShapeMap implements \ArrayAccess
9 9 {
10 10 /** @var array */
11 11 private $definitions;
12 12 /** @var Shape[] */
@@ -54,6 +54,39 @@
54 54 if ($isSimple) {
55 55 $this->simple[$shape] = $result;
56 56 }
57 57 return $result;
58 + }
59 + /**
60 + * @param mixed $offset
61 + * @return bool
62 + */
63 + public function offsetExists(mixed $offset) : bool
64 + {
65 + return isset($this->definitions[$offset]);
66 + }
67 + /**
68 + * @param mixed $offset
69 + * @return mixed
70 + */
71 + public function offsetGet(mixed $offset) : mixed
72 + {
73 + return $this->definitions[$offset] ?? null;
74 + }
75 + /**
76 + * @param mixed $offset
77 + * @param mixed $value
78 + * @throws \BadMethodCallException
79 + */
80 + public function offsetSet(mixed $offset, mixed $value) : void
81 + {
82 + throw new \BadMethodCallException('ShapeMap is read-only and cannot be modified.');
83 + }
84 + /**
85 + * @param mixed $offset
86 + * @throws \BadMethodCallException
87 + */
88 + public function offsetUnset(mixed $offset) : void
89 + {
90 + throw new \BadMethodCallException('ShapeMap is read-only and cannot be modified.');
58 91 }
59 92 }