getRawData(); $item = $thisData[$this->position][$this->key]; if (!$item instanceof Stub || !$item->position) { return; } $keys = array($key); switch ($item->type) { case Stub::TYPE_OBJECT: $keys[] = "\0+\0".$key; $keys[] = "\0*\0".$key; $keys[] = "\0~\0".$key; $keys[] = "\0$item->class\0$key"; case Stub::TYPE_ARRAY: case Stub::TYPE_RESOURCE: break; default: return; } $data = null; $children = $thisData[$item->position]; foreach ($keys as $key) { if (isset($children[$key]) || array_key_exists($key, $children)) { $data = clone $this; $data->key = $key; $data->position = $item->position; break; } } return $data; } /** * {@inheritdoc} */ public function dump(DumperInterface $dumper) { // Override the base class dump to use the position and key $refs = array(0); $class = new \ReflectionClass($this); $dumpItem = $class->getMethod('dumpItem'); $dumpItem->setAccessible(true); $data = $this->getRawData(); $args = array($dumper, new Cursor(), &$refs, $data[$this->position][$this->key]); $dumpItem->invokeArgs($this, $args); } }