From c78d55910e52aac966c7047f4b5fe2b2aa82d802 Mon Sep 17 00:00:00 2001 From: Antoine Guigan Date: Thu, 11 Sep 2014 15:12:33 +0200 Subject: [PATCH] Revert "Corrected uploaded file path overwriting file path" This reverts commit 45f9104d17e7be1d91e156a43909982cf03e2248. --- Reader/FileIteratorReader.php | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/Reader/FileIteratorReader.php b/Reader/FileIteratorReader.php index eb81051..9e719d1 100644 --- a/Reader/FileIteratorReader.php +++ b/Reader/FileIteratorReader.php @@ -40,11 +40,6 @@ class FileIteratorReader extends AbstractIteratorReader implements UploadedFileA */ protected $filePath; - /** - * @var string - */ - protected $uploadedFilePath; - /** * @var boolean * @@ -115,7 +110,7 @@ public function getUploadedFileConstraints() */ public function setUploadedFile(File $uploadedFile) { - $this->uploadedFilePath = $uploadedFile->getRealPath(); + $this->filePath = $uploadedFile->getRealPath(); $this->reset(); return $this; @@ -175,21 +170,7 @@ public function getFilePath() */ protected function createIterator() { - return $this->iteratorFactory->create( - $this->iteratorClass, - $this->getImportedFilePath(), - $this->getIteratorOptions() - ); - } - - /** - * Returns the path of the uploaded file - * - * @return string - */ - protected function getImportedFilePath() - { - return $this->uploadedFilePath ?: $this->filePath; + return $this->iteratorFactory->create($this->iteratorClass, $this->filePath, $this->getIteratorOptions()); } /** @@ -201,12 +182,4 @@ protected function getIteratorOptions() { return $this->iteratorOptions; } - - /** - * {@inheritdoc} - */ - public function initialize() - { - parent::initialize(); - } }