Commit 5f6c1fb6 authored by Jeremy Mikola's avatar Jeremy Mikola

Replace public $id property with getter method

parent f2666e19
...@@ -183,8 +183,8 @@ class Bucket ...@@ -183,8 +183,8 @@ class Bucket
{ {
$metadata = stream_get_meta_data($stream); $metadata = stream_get_meta_data($stream);
if (isset($metadata['wrapper_data']->id)) { if ($metadata['wrapper_data'] instanceof StreamWrapper) {
return $metadata['wrapper_data']->id; return $metadata['wrapper_data']->getId();
} }
return; return;
......
...@@ -12,12 +12,17 @@ namespace MongoDB\GridFS; ...@@ -12,12 +12,17 @@ namespace MongoDB\GridFS;
class StreamWrapper class StreamWrapper
{ {
public $context; public $context;
public $id;
private $collectionsWrapper; private $collectionsWrapper;
private $gridFSStream; private $gridFSStream;
private $id;
private $mode; private $mode;
public function getId()
{
return $this->id;
}
public function openReadStream() public function openReadStream()
{ {
$context = stream_context_get_options($this->context); $context = stream_context_get_options($this->context);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment