public function convert($records)
    {
        if (!is_iterable($records)) {
            throw new TypeError(sprintf('%s() expects argument passed to be iterable, %s given', __METHOD__, gettype($records)));
        }

        if ($this->output_encoding === $this->input_encoding) {
            return $records;
        }

        if (is_array($records)) {
            return array_map($this, $records);
        }

        return new MapIterator($records, $this);
    }
public function convert($records)
    {
        if (!is_iterable($records)) {
            throw new TypeError(sprintf('%s() expects argument passed to be iterable, %s given', __METHOD__, gettype($records)));
        }

        if ($this->output_encoding === $this->input_encoding) {
            return $records;
        }

        if (is_array($records)) {
            return array_map($this, $records);
        }

        return new MapIterator($records, $this);
    }
public function convert ( $ records ) { if ( ! is_iterable ( $ records ) ) { throw new TypeError ( sprintf ( '%s() expects argument passed to be iterable, %s given' , __METHOD__ , gettype ( $ records ) ) ) ; } if ( $ this -> output_encoding === $ this -> input_encoding ) { return $ records ; } if ( is_array ( $ records ) ) { return array_map ( $ this , $ records ) ; } return new MapIterator ( $ records , $ this ) ; }
Convert Csv records collection into UTF-8.

@param array|Traversable $records

@return array|Traversable
Convert Csv records collection into UTF - 8 .