Skip to content

Commit

Permalink
field case
Browse files Browse the repository at this point in the history
  • Loading branch information
mathielen committed Jun 22, 2017
1 parent ca2d188 commit a1d0b4b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
21 changes: 21 additions & 0 deletions src/Mathielen/DataImport/ItemConverter/FieldCaseConverter.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace Mathielen\DataImport\ItemConverter;

use Ddeboer\DataImport\ItemConverter\ItemConverterInterface;

class FieldCaseConverter implements ItemConverterInterface
{

private $transformToCase;

public function __construct($transformToCase = CASE_LOWER)
{
$this->transformToCase = $transformToCase;
}

public function convert($input)
{
return array_change_key_case($input, $this->transformToCase);
}
}
13 changes: 0 additions & 13 deletions src/Mathielen/DataImport/ItemConverter/FieldLowercaseConverter.php

This file was deleted.

0 comments on commit a1d0b4b

Please sign in to comment.