Class TMap
Definition at line 14 of file TMap.php.
◆ __construct()
- Parameters
-
Definition at line 58 of file TMap.php.
65 if (!
class_exists($this->type) && !interface_exists($type)) {
66 throw new \InvalidArgumentException(sprintf(
'Unknown type %s', $type));
71 $this->objectManager = $objectManager;
72 $this->configInterface = $configInterface;
81 $this->array = $array;
82 $this->counter =
count($array);
83 $this->objectCreationStrategy = $objectCreationStrategy;
◆ count()
{inheritdoc}
Definition at line 207 of file TMap.php.
209 return $this->counter;
◆ getIterator()
{inheritdoc}
Definition at line 147 of file TMap.php.
149 if (array_keys($this->array) != array_keys($this->objectsArray)) {
150 foreach (array_keys($this->array) as
$index) {
151 $this->initObject(
$index);
155 return new \ArrayIterator($this->objectsArray);
◆ offsetExists()
{inheritdoc}
Definition at line 161 of file TMap.php.
163 return array_key_exists($offset, $this->array);
◆ offsetGet()
{inheritdoc}
Definition at line 169 of file TMap.php.
171 return isset($this->array[$offset]) ? $this->initObject($offset) : null;
◆ offsetSet()
offsetSet |
( |
|
$offset, |
|
|
|
$value |
|
) |
| |
{inheritdoc}
Definition at line 177 of file TMap.php.
179 $this->assertValidTypeLazy(
$value, $offset);
180 if ($offset ===
null) {
183 $this->array[$offset] =
$value;
◆ offsetUnset()
{inheritdoc}
Definition at line 192 of file TMap.php.
194 if ($this->counter && isset($this->array[$offset])) {
196 unset($this->array[$offset]);
198 if (isset($this->objectsArray[$offset])) {
199 unset($this->objectsArray[$offset]);
The documentation for this class was generated from the following file:
- vendor/magento/framework/ObjectManager/TMap.php