summaryrefslogtreecommitdiffstats
path: root/src/Modifier/QueryFilter.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Modifier/QueryFilter.php')
-rw-r--r--src/Modifier/QueryFilter.php49
1 files changed, 0 insertions, 49 deletions
diff --git a/src/Modifier/QueryFilter.php b/src/Modifier/QueryFilter.php
index aaa1bfc..daaaa89 100644
--- a/src/Modifier/QueryFilter.php
+++ b/src/Modifier/QueryFilter.php
@@ -15,9 +15,7 @@ namespace League\Csv\Modifier;
use ArrayObject;
use CallbackFilterIterator;
use Iterator;
-use League\Csv\AbstractCsv;
use LimitIterator;
-use UnexpectedValueException;
/**
* A Trait to Query rows against a SplFileObject
@@ -64,33 +62,6 @@ trait QueryFilter
protected $strip_bom = false;
/**
- * Reader return type
- *
- * @var int
- */
- protected $returnType = AbstractCsv::TYPE_ARRAY;
-
- /**
- * Set the return type for the next fetch call
- *
- * @param int $type
- *
- * @throws UnexpectedValueException If the value is not one of the defined constant
- *
- * @return static
- */
- public function setReturnType($type)
- {
- $returnTypeList = [AbstractCsv::TYPE_ARRAY => 1, AbstractCsv::TYPE_ITERATOR => 1];
- if (!isset($returnTypeList[$type])) {
- throw new UnexpectedValueException('Unknown return type');
- }
- $this->returnType = $type;
-
- return $this;
- }
-
- /**
* Stripping BOM setter
*
* @param bool $status
@@ -192,8 +163,6 @@ trait QueryFilter
$iterator = $this->applyIteratorSortBy($iterator);
$iterator = $this->applyIteratorInterval($iterator);
- $this->returnType = AbstractCsv::TYPE_ARRAY;
-
return $iterator;
}
@@ -326,22 +295,4 @@ trait QueryFilter
return new LimitIterator($iterator, $offset, $limit);
}
-
- /**
- * Convert the Iterator into an array depending on the selected return type
- *
- * @param int $type
- * @param Iterator $iterator
- * @param bool $use_keys Whether to use the iterator element keys as index
- *
- * @return Iterator|array
- */
- protected function applyReturnType($type, Iterator $iterator, $use_keys = true)
- {
- if (AbstractCsv::TYPE_ARRAY == $type) {
- return iterator_to_array($iterator, $use_keys);
- }
-
- return $iterator;
- }
}