Skip to content

Commit

Permalink
MAGETWO-71954: Expanded ReadInterface #10672
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksii Korshenko authored Aug 30, 2017
2 parents c436898 + b06574f commit d490d5c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ public function current()
);
}

/** @var \Magento\Framework\Filesystem\File\Read $fileRead */
$fileRead = $this->fileReadFactory->create($this->key(), DriverPool::FILE);
$contents = $fileRead->readAll();
return str_replace('<template ', '<template module="' . $moduleName . '" ', $contents);
Expand Down
1 change: 0 additions & 1 deletion app/code/Magento/Translation/Model/Js/DataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ public function getData($themePath)

$dictionary = [];
foreach ($files as $filePath) {
/** @var \Magento\Framework\Filesystem\File\Read $read */
$read = $this->fileReadFactory->create($filePath[0], \Magento\Framework\Filesystem\DriverPool::FILE);
$content = $read->readAll();
foreach ($this->getPhrases($content) as $phrase) {
Expand Down
1 change: 0 additions & 1 deletion lib/internal/Magento/Framework/Config/FileIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ public function rewind()
*/
public function current()
{
/** @var \Magento\Framework\Filesystem\File\Read $fileRead */
$fileRead = $this->fileReadFactory->create($this->key(), DriverPool::FILE);
return $fileRead->readAll();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ interface ReadInterface
*/
public function read($length);

/**
* Returns the complete content of the file.
*
* @param string|null $flag
* @param resource|null $context
* @return string
*/
public function readAll($flag = null, $context = null);

/**
* Reads the line with specified number of bytes from the current position.
*
Expand Down

0 comments on commit d490d5c

Please sign in to comment.