Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongo-php-library
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sinan
mongo-php-library
Commits
5f6c1fb6
Commit
5f6c1fb6
authored
Jan 11, 2016
by
Jeremy Mikola
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace public $id property with getter method
parent
f2666e19
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
Bucket.php
src/GridFS/Bucket.php
+2
-2
StreamWrapper.php
src/GridFS/StreamWrapper.php
+6
-1
No files found.
src/GridFS/Bucket.php
View file @
5f6c1fb6
...
@@ -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
;
...
...
src/GridFS/StreamWrapper.php
View file @
5f6c1fb6
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment