@@ -15,7 +15,6 @@ |
||
15 | 15 | |
16 | 16 | use Alcaeus\MongoDbAdapter\TypeInterface; |
17 | 17 | use MongoDB\BSON\Binary; |
18 | -use MongoDB\BSON\Type; |
|
19 | 18 | |
20 | 19 | class MongoBinData implements TypeInterface |
21 | 20 | { |
@@ -15,7 +15,6 @@ |
||
15 | 15 | |
16 | 16 | use Alcaeus\MongoDbAdapter\AbstractCursor; |
17 | 17 | use MongoDB\Driver\Cursor; |
18 | -use MongoDB\Driver\ReadPreference; |
|
19 | 18 | use MongoDB\Operation\Find; |
20 | 19 | |
21 | 20 | /** |
@@ -13,6 +13,7 @@ |
||
13 | 13 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
14 | 14 | */ |
15 | 15 | |
16 | -class MongoConnectionException extends MongoException { |
|
16 | +class MongoConnectionException extends MongoException |
|
17 | +{ |
|
17 | 18 | |
18 | 19 | } |
@@ -13,6 +13,7 @@ |
||
13 | 13 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
14 | 14 | */ |
15 | 15 | |
16 | -class MongoCursorException extends MongoException { |
|
16 | +class MongoCursorException extends MongoException |
|
17 | +{ |
|
17 | 18 | |
18 | 19 | } |
@@ -13,6 +13,7 @@ |
||
13 | 13 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
14 | 14 | */ |
15 | 15 | |
16 | -class MongoCursorTimeoutException extends MongoCursorException { |
|
16 | +class MongoCursorTimeoutException extends MongoCursorException |
|
17 | +{ |
|
17 | 18 | |
18 | 19 | } |
@@ -17,6 +17,7 @@ |
||
17 | 17 | * <p>(PECL mongo >= 1.5.0)</p> |
18 | 18 | * @link http://php.net/manual/en/class.mongoduplicatekeyexception.php |
19 | 19 | */ |
20 | -class MongoDuplicateKeyException extends MongoWriteConcernException { |
|
20 | +class MongoDuplicateKeyException extends MongoWriteConcernException |
|
21 | +{ |
|
21 | 22 | |
22 | 23 | } |
@@ -13,5 +13,6 @@ |
||
13 | 13 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
14 | 14 | */ |
15 | 15 | |
16 | -class MongoException extends Exception { |
|
16 | +class MongoException extends Exception |
|
17 | +{ |
|
17 | 18 | } |
@@ -17,4 +17,6 @@ |
||
17 | 17 | * <p>(PECL mongo >= 1.5.0)</p> |
18 | 18 | * @link http://php.net/manual/en/class.mongoexecutiontimeoutexception.php |
19 | 19 | */ |
20 | -class MongoExecutionTimeoutException extends MongoException {} |
|
20 | +class MongoExecutionTimeoutException extends MongoException |
|
21 | +{ |
|
22 | +} |
@@ -13,7 +13,8 @@ discard block |
||
13 | 13 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
14 | 14 | */ |
15 | 15 | |
16 | -class MongoGridFS extends MongoCollection { |
|
16 | +class MongoGridFS extends MongoCollection |
|
17 | +{ |
|
17 | 18 | const ASCENDING = 1; |
18 | 19 | const DESCENDING = -1; |
19 | 20 | |
@@ -48,14 +49,18 @@ discard block |
||
48 | 49 | * @param mixed $chunks [optional] |
49 | 50 | * @return MongoGridFS |
50 | 51 | */ |
51 | - public function __construct($db, $prefix = "fs", $chunks = "fs") {} |
|
52 | + public function __construct($db, $prefix = "fs", $chunks = "fs") |
|
53 | + { |
|
54 | +} |
|
52 | 55 | |
53 | 56 | /** |
54 | 57 | * Drops the files and chunks collections |
55 | 58 | * @link http://php.net/manual/en/mongogridfs.drop.php |
56 | 59 | * @return array The database response |
57 | 60 | */ |
58 | - public function drop() {} |
|
61 | + public function drop() |
|
62 | + { |
|
63 | +} |
|
59 | 64 | |
60 | 65 | /** |
61 | 66 | * @link http://php.net/manual/en/mongogridfs.find.php |
@@ -63,7 +68,9 @@ discard block |
||
63 | 68 | * @param array $fields Fields to return |
64 | 69 | * @return MongoGridFSCursor A MongoGridFSCursor |
65 | 70 | */ |
66 | - public function find(array $query = array(), array $fields = array()) {} |
|
71 | + public function find(array $query = array(), array $fields = array()) |
|
72 | + { |
|
73 | +} |
|
67 | 74 | |
68 | 75 | /** |
69 | 76 | * Stores a file in the database |
@@ -73,7 +80,9 @@ discard block |
||
73 | 80 | * @param array $options Options for the store. "safe": Check that this store succeeded |
74 | 81 | * @return mixed Returns the _id of the saved object |
75 | 82 | */ |
76 | - public function storeFile($filename, $extra = array(), $options = array()) {} |
|
83 | + public function storeFile($filename, $extra = array(), $options = array()) |
|
84 | + { |
|
85 | +} |
|
77 | 86 | |
78 | 87 | /** |
79 | 88 | * Chunkifies and stores bytes in the database |
@@ -83,7 +92,9 @@ discard block |
||
83 | 92 | * @param array $options Options for the store. "safe": Check that this store succeeded |
84 | 93 | * @return mixed The _id of the object saved |
85 | 94 | */ |
86 | - public function storeBytes($bytes, $extra = array(), $options = array()) {} |
|
95 | + public function storeBytes($bytes, $extra = array(), $options = array()) |
|
96 | + { |
|
97 | +} |
|
87 | 98 | |
88 | 99 | /** |
89 | 100 | * Returns a single file matching the criteria |
@@ -92,7 +103,9 @@ discard block |
||
92 | 103 | * @param array $fields Fields of the results to return. |
93 | 104 | * @return MongoGridFSFile|null |
94 | 105 | */ |
95 | - public function findOne(array $query = array(), array $fields = array()) {} |
|
106 | + public function findOne(array $query = array(), array $fields = array()) |
|
107 | + { |
|
108 | +} |
|
96 | 109 | |
97 | 110 | /** |
98 | 111 | * Removes files from the collections |
@@ -102,7 +115,9 @@ discard block |
||
102 | 115 | * @throws MongoCursorException |
103 | 116 | * @return boolean |
104 | 117 | */ |
105 | - public function remove(array $criteria = array(), array $options = array()) {} |
|
118 | + public function remove(array $criteria = array(), array $options = array()) |
|
119 | + { |
|
120 | +} |
|
106 | 121 | |
107 | 122 | /** |
108 | 123 | * Delete a file from the database |
@@ -110,7 +125,9 @@ discard block |
||
110 | 125 | * @param mixed $id _id of the file to remove |
111 | 126 | * @return boolean Returns true if the remove was successfully sent to the database. |
112 | 127 | */ |
113 | - public function delete($id) {} |
|
128 | + public function delete($id) |
|
129 | + { |
|
130 | +} |
|
114 | 131 | |
115 | 132 | /** |
116 | 133 | * Saves an uploaded file directly from a POST to the database |
@@ -119,7 +136,9 @@ discard block |
||
119 | 136 | * @param array $metadata An array of extra fields for the uploaded file. |
120 | 137 | * @return mixed Returns the _id of the uploaded file. |
121 | 138 | */ |
122 | - public function storeUpload($name, array $metadata = array()) {} |
|
139 | + public function storeUpload($name, array $metadata = array()) |
|
140 | + { |
|
141 | +} |
|
123 | 142 | |
124 | 143 | |
125 | 144 | /** |
@@ -128,7 +147,9 @@ discard block |
||
128 | 147 | * @param mixed $id _id of the file to find. |
129 | 148 | * @return MongoGridFSFile|null Returns the file, if found, or NULL. |
130 | 149 | */ |
131 | - public function __get($id) {} |
|
150 | + public function __get($id) |
|
151 | + { |
|
152 | +} |
|
132 | 153 | |
133 | 154 | /** |
134 | 155 | * Stores a file in the database |
@@ -137,6 +158,8 @@ discard block |
||
137 | 158 | * @param array $extra Other metadata to add to the file saved |
138 | 159 | * @return mixed Returns the _id of the saved object |
139 | 160 | */ |
140 | - public function put($filename, array $extra = array()) {} |
|
161 | + public function put($filename, array $extra = array()) |
|
162 | + { |
|
163 | +} |
|
141 | 164 | |
142 | 165 | } |