public function transform($iterator)
    {
        if (null === $iterator) {
            return array();
        }

        if (is_array($iterator)) {
            return $iterator;
        }

        if (!$iterator instanceof Iterator) {
            throw new TransformationFailedException('Expected a Yucca\Component\Iterator\Iterator object.');
        }

        return $iterator->getArray();
    }