/** * Returns original data. * * @return array|\Traversable * * @throws DataException */ public function getRaw() { switch ($this->type) { case self::TYPE_ARRAY: return $this->data->getArrayCopy(); case self::TYPE_ITERATOR: return $this->data; case self::TYPE_AGGREGATE: return $this->data->getInnerIterator(); } throw DataException::invalidCollectionData($this->data); }