Skip to content

Commit 01c7e69

Browse files
authored
Merge pull request #109 from max-kovpak/patch-1
Added getResource method
2 parents a187d12 + 4f6b97f commit 01c7e69

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

src/Archive/Member.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,4 +136,12 @@ public function extract($to = null, $overwrite = false)
136136

137137
return new \SplFileInfo(sprintf('%s%s', rtrim(null === $to ? getcwd() : $to, '/'), $this->location));
138138
}
139+
140+
/**
141+
* @inheritdoc
142+
* */
143+
public function getResource()
144+
{
145+
return $this->resource;
146+
}
139147
}

src/Archive/MemberInterface.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Alchemy\Zippy\Archive;
1313

14+
use Alchemy\Zippy\Adapter\Resource\ResourceInterface;
1415
use Alchemy\Zippy\Exception\InvalidArgumentException;
1516
use Alchemy\Zippy\Exception\RuntimeException;
1617

@@ -62,7 +63,14 @@ public function getSize();
6263
* @throws InvalidArgumentException In case no members could be removed or provide extract target directory is not valid
6364
*/
6465
public function extract($to = null, $overwrite = false);
65-
66+
67+
/**
68+
* Get resource.
69+
*
70+
* @return ResourceInterface
71+
* */
72+
public function getResource();
73+
6674
/**
6775
* @inheritdoc
6876
*/

0 commit comments

Comments
 (0)