public function toArray()
    {
        if (\is_array($this->data)) {
            return $this->data;
        }

        if ($this->data instanceof \ArrayIterator) {
            return iterator_to_array($this->data, false);
        }

        if ($this->data instanceof \IteratorAggregate) {
            return iterator_to_array($this->data->getIterator(), false);
        }

        throw new ArrayConversionException('Cannot convert data to array');
    }
public function toArray()
    {
        if (\is_array($this->data)) {
            return $this->data;
        }

        if ($this->data instanceof \ArrayIterator) {
            return iterator_to_array($this->data, false);
        }

        if ($this->data instanceof \IteratorAggregate) {
            return iterator_to_array($this->data->getIterator(), false);
        }

        throw new ArrayConversionException('Cannot convert data to array');
    }
public function toArray ( ) { if ( \ is_array ( $ this -> data ) ) { return $ this -> data ; } if ( $ this -> data instanceof \ ArrayIterator ) { return iterator_to_array ( $ this -> data , false ) ; } if ( $ this -> data instanceof \ IteratorAggregate ) { return iterator_to_array ( $ this -> data -> getIterator ( ) , false ) ; } throw new ArrayConversionException ( 'Cannot convert data to array' ) ; }
Converts the Collection data to an array.

@throws \Rexlabs\Smokescreen\Exception\ArrayConversionException

@return array|\ArrayIterator|mixed|null
Converts the Collection data to an array .