Skip to content

Commit

Permalink
Init
Browse files Browse the repository at this point in the history
  • Loading branch information
odan committed Aug 6, 2019
1 parent a19e576 commit 0e756b1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ composer require selective/rar
use Selective\Rar\RarFileReader;
use SplFileObject;

$rarArchive = $fileReader->openFile(new SplFileObject('test.rar));
$rarFileReader = new RarFileReader();
$rarArchive = $rarFileReader->openFile(new SplFileObject('test.rar'));

foreach ($rarArchive->getEntries() as $entry) {
echo $entry->getName() . "\n";
Expand All @@ -52,7 +53,8 @@ use SplTempFileObject;
$file = new SplTempFileObject();
$file->fwrite('my binary rar content');

$rarArchive = $fileReader->openFile($file);
$rarFileReader = new RarFileReader();
$rarArchive = $rarFileReader->openFile($file);

foreach ($rarArchive->getEntries() as $entry) {
echo $entry->getName() . "\n";
Expand Down

0 comments on commit 0e756b1

Please sign in to comment.