Skip to content

Commit 0124ecf

Browse files
committed
Merge pull request #347
2 parents 1ac1746 + e85ba1b commit 0124ecf

27 files changed

+261
-315
lines changed

php_phongo_classes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ extern PHONGO_API zend_class_entry *php_phongo_timestamp_ce;
235235
extern PHONGO_API zend_class_entry *php_phongo_utcdatetime_ce;
236236

237237
/* Shared across all MongoDB\Driver objects to disable unserialize() */
238-
PHP_METHOD(Manager, __wakeUp);
238+
PHP_METHOD(Manager, __wakeup);
239239
/* Shared across all final MongoDB\Driver value objects, only possible to construct them internally */
240240
PHP_METHOD(Server, __construct);
241241

src/BSON/Binary.c

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ static bool php_phongo_binary_init_from_hash(php_phongo_binary_t *intern, HashTa
8686
return false;
8787
}
8888

89-
/* {{{ proto BSON\Binary Binary::__construct(string $data, int $type)
90-
Construct a new BSON Binary type */
89+
/* {{{ proto void Binary::__construct(string $data, int $type)
90+
Construct a new BSON binary type */
9191
PHP_METHOD(Binary, __construct)
9292
{
9393
php_phongo_binary_t *intern;
@@ -110,7 +110,7 @@ PHP_METHOD(Binary, __construct)
110110
}
111111
/* }}} */
112112

113-
/* {{{ proto Binary::__set_state(array $properties)
113+
/* {{{ proto void Binary::__set_state(array $properties)
114114
*/
115115
PHP_METHOD(Binary, __set_state)
116116
{
@@ -131,7 +131,7 @@ PHP_METHOD(Binary, __set_state)
131131
}
132132
/* }}} */
133133

134-
/* {{{ proto Binary::__wakeup()
134+
/* {{{ proto void Binary::__wakeup()
135135
*/
136136
PHP_METHOD(Binary, __wakeup)
137137
{
@@ -150,7 +150,7 @@ PHP_METHOD(Binary, __wakeup)
150150
/* }}} */
151151

152152
/* {{{ proto string Binary::getData()
153-
*/
153+
*/
154154
PHP_METHOD(Binary, getData)
155155
{
156156
php_phongo_binary_t *intern;
@@ -165,8 +165,9 @@ PHP_METHOD(Binary, getData)
165165
PHONGO_RETURN_STRINGL(intern->data, intern->data_len);
166166
}
167167
/* }}} */
168+
168169
/* {{{ proto integer Binary::getType()
169-
*/
170+
*/
170171
PHP_METHOD(Binary, getType)
171172
{
172173
php_phongo_binary_t *intern;
@@ -188,21 +189,21 @@ PHP_METHOD(Binary, getType)
188189
ZEND_BEGIN_ARG_INFO_EX(ai_Binary___construct, 0, 0, 2)
189190
ZEND_ARG_INFO(0, data)
190191
ZEND_ARG_INFO(0, type)
191-
ZEND_END_ARG_INFO();
192+
ZEND_END_ARG_INFO()
192193

193194
ZEND_BEGIN_ARG_INFO_EX(ai_Binary___set_state, 0, 0, 1)
194195
ZEND_ARG_ARRAY_INFO(0, properties, 0)
195-
ZEND_END_ARG_INFO();
196+
ZEND_END_ARG_INFO()
196197

197198
ZEND_BEGIN_ARG_INFO_EX(ai_Binary_void, 0, 0, 0)
198-
ZEND_END_ARG_INFO();
199+
ZEND_END_ARG_INFO()
199200

200201
static zend_function_entry php_phongo_binary_me[] = {
201202
PHP_ME(Binary, __construct, ai_Binary___construct, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
202203
PHP_ME(Binary, __set_state, ai_Binary___set_state, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
204+
PHP_ME(Binary, __wakeup, ai_Binary_void, ZEND_ACC_PUBLIC)
203205
PHP_ME(Binary, getData, ai_Binary_void, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
204206
PHP_ME(Binary, getType, ai_Binary_void, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
205-
PHP_ME(Binary, __wakeup, ai_Binary_void, ZEND_ACC_PUBLIC)
206207
PHP_FE_END
207208
};
208209

src/BSON/Decimal128.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ static bool php_phongo_decimal128_init_from_hash(php_phongo_decimal128_t *intern
8282
return false;
8383
}
8484

85-
/* {{{ proto BSON\Decimal128 Decimal128::__construct(string $value)
85+
/* {{{ proto void Decimal128::__construct(string $value)
8686
Construct a new BSON Decimal128 type */
8787
PHP_METHOD(Decimal128, __construct)
8888
{
@@ -105,7 +105,7 @@ PHP_METHOD(Decimal128, __construct)
105105
}
106106
/* }}} */
107107

108-
/* {{{ proto Decimal128::__set_state(array $properties)
108+
/* {{{ proto void Decimal128::__set_state(array $properties)
109109
*/
110110
PHP_METHOD(Decimal128, __set_state)
111111
{
@@ -126,8 +126,8 @@ PHP_METHOD(Decimal128, __set_state)
126126
}
127127
/* }}} */
128128

129-
/* {{{ proto void Decimal128::__toString()
130-
*/
129+
/* {{{ proto string Decimal128::__toString()
130+
*/
131131
PHP_METHOD(Decimal128, __toString)
132132
{
133133
php_phongo_decimal128_t *intern;
@@ -145,7 +145,7 @@ PHP_METHOD(Decimal128, __toString)
145145
}
146146
/* }}} */
147147

148-
/* {{{ proto Decimal128::__wakeup()
148+
/* {{{ proto void Decimal128::__wakeup()
149149
*/
150150
PHP_METHOD(Decimal128, __wakeup)
151151
{
@@ -167,14 +167,14 @@ PHP_METHOD(Decimal128, __wakeup)
167167

168168
ZEND_BEGIN_ARG_INFO_EX(ai_Decimal128___construct, 0, 0, 1)
169169
ZEND_ARG_INFO(0, value)
170-
ZEND_END_ARG_INFO();
170+
ZEND_END_ARG_INFO()
171171

172172
ZEND_BEGIN_ARG_INFO_EX(ai_Decimal128___set_state, 0, 0, 1)
173173
ZEND_ARG_ARRAY_INFO(0, properties, 0)
174-
ZEND_END_ARG_INFO();
174+
ZEND_END_ARG_INFO()
175175

176176
ZEND_BEGIN_ARG_INFO_EX(ai_Decimal128_void, 0, 0, 0)
177-
ZEND_END_ARG_INFO();
177+
ZEND_END_ARG_INFO()
178178

179179
static zend_function_entry php_phongo_decimal128_me[] = {
180180
PHP_ME(Decimal128, __construct, ai_Decimal128___construct, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)

src/BSON/Javascript.c

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,10 @@ static bool php_phongo_javascript_init_from_hash(php_phongo_javascript_t *intern
9999
return false;
100100
}
101101

102-
/* {{{ proto BSON\Javascript Javascript::__construct(string $code[, array|object $scope])
103-
* The string is JavaScript code. The document is a mapping from identifiers to values, representing the scope in which the string should be evaluated
104-
* NOTE: eJSON does not support this type :( */
102+
/* {{{ proto void Javascript::__construct(string $code[, array|object $scope])
103+
Construct a new BSON Javascript type. The scope is a document mapping
104+
identifiers and values, representing the scope in which the code string will
105+
be evaluated. Note that this type cannot be represented as Extended JSON. */
105106
PHP_METHOD(Javascript, __construct)
106107
{
107108
php_phongo_javascript_t *intern;
@@ -124,7 +125,7 @@ PHP_METHOD(Javascript, __construct)
124125
}
125126
/* }}} */
126127

127-
/* {{{ proto Javascript::__set_state(array $properties)
128+
/* {{{ proto void Javascript::__set_state(array $properties)
128129
*/
129130
PHP_METHOD(Javascript, __set_state)
130131
{
@@ -145,7 +146,7 @@ PHP_METHOD(Javascript, __set_state)
145146
}
146147
/* }}} */
147148

148-
/* {{{ proto Javascript::__wakeup()
149+
/* {{{ proto void Javascript::__wakeup()
149150
*/
150151
PHP_METHOD(Javascript, __wakeup)
151152
{
@@ -168,14 +169,14 @@ PHP_METHOD(Javascript, __wakeup)
168169
ZEND_BEGIN_ARG_INFO_EX(ai_Javascript___construct, 0, 0, 1)
169170
ZEND_ARG_INFO(0, javascript)
170171
ZEND_ARG_INFO(0, scope)
171-
ZEND_END_ARG_INFO();
172+
ZEND_END_ARG_INFO()
172173

173174
ZEND_BEGIN_ARG_INFO_EX(ai_Javascript___set_state, 0, 0, 1)
174175
ZEND_ARG_ARRAY_INFO(0, properties, 0)
175-
ZEND_END_ARG_INFO();
176+
ZEND_END_ARG_INFO()
176177

177178
ZEND_BEGIN_ARG_INFO_EX(ai_Javascript_void, 0, 0, 0)
178-
ZEND_END_ARG_INFO();
179+
ZEND_END_ARG_INFO()
179180

180181
static zend_function_entry php_phongo_javascript_me[] = {
181182
PHP_ME(Javascript, __construct, ai_Javascript___construct, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)

src/BSON/MaxKey.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ PHP_METHOD(MaxKey, __wakeup)
7272

7373
ZEND_BEGIN_ARG_INFO_EX(ai_MaxKey___set_state, 0, 0, 1)
7474
ZEND_ARG_ARRAY_INFO(0, properties, 0)
75-
ZEND_END_ARG_INFO();
75+
ZEND_END_ARG_INFO()
7676

7777
ZEND_BEGIN_ARG_INFO_EX(ai_MaxKey_void, 0, 0, 0)
7878
ZEND_END_ARG_INFO()

src/BSON/MinKey.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ PHP_METHOD(MinKey, __wakeup)
7272

7373
ZEND_BEGIN_ARG_INFO_EX(ai_MinKey___set_state, 0, 0, 1)
7474
ZEND_ARG_ARRAY_INFO(0, properties, 0)
75-
ZEND_END_ARG_INFO();
75+
ZEND_END_ARG_INFO()
7676

7777
ZEND_BEGIN_ARG_INFO_EX(ai_MinKey_void, 0, 0, 0)
7878
ZEND_END_ARG_INFO()

src/BSON/ObjectID.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ static bool php_phongo_objectid_init_from_hash(php_phongo_objectid_t *intern, Ha
107107
return false;
108108
}
109109

110-
/* {{{ proto BSON\ObjectID ObjectID::__construct(string $id)
111-
Constructs a new Object ID, optionally from a string */
110+
/* {{{ proto void ObjectID::__construct([string $id])
111+
Constructs a new BSON ObjectID type, optionally from a hex string. */
112112
PHP_METHOD(ObjectID, __construct)
113113
{
114114
php_phongo_objectid_t *intern;
@@ -155,7 +155,7 @@ PHP_METHOD(ObjectID, __set_state)
155155
}
156156
/* }}} */
157157

158-
/* {{{ proto void ObjectID::__toString()
158+
/* {{{ proto string ObjectID::__toString()
159159
*/
160160
PHP_METHOD(ObjectID, __toString)
161161
{
@@ -195,11 +195,11 @@ PHP_METHOD(ObjectID, __wakeup)
195195

196196
ZEND_BEGIN_ARG_INFO_EX(ai_ObjectID___construct, 0, 0, 0)
197197
ZEND_ARG_INFO(0, id)
198-
ZEND_END_ARG_INFO();
198+
ZEND_END_ARG_INFO()
199199

200200
ZEND_BEGIN_ARG_INFO_EX(ai_ObjectID___set_state, 0, 0, 1)
201201
ZEND_ARG_ARRAY_INFO(0, properties, 0)
202-
ZEND_END_ARG_INFO();
202+
ZEND_END_ARG_INFO()
203203

204204
ZEND_BEGIN_ARG_INFO_EX(ai_ObjectID_void, 0, 0, 0)
205205
ZEND_END_ARG_INFO()

src/BSON/Regex.c

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ static bool php_phongo_regex_init_from_hash(php_phongo_regex_t *intern, HashTabl
9292
return false;
9393
}
9494

95-
/* {{{ proto BSON\Regex Regex::__construct(string $pattern, string $flags)
96-
Constructs a new regular expression. */
95+
/* {{{ proto void Regex::__construct(string $pattern, string $flags)
96+
Constructs a new BSON regular expression type. */
9797
PHP_METHOD(Regex, __construct)
9898
{
9999
php_phongo_regex_t *intern;
@@ -116,8 +116,9 @@ PHP_METHOD(Regex, __construct)
116116
php_phongo_regex_init(intern, pattern, pattern_len, flags, flags_len TSRMLS_CC);
117117
}
118118
/* }}} */
119-
/* {{{ proto void Regex::getPattern()
120-
*/
119+
120+
/* {{{ proto string Regex::getPattern()
121+
*/
121122
PHP_METHOD(Regex, getPattern)
122123
{
123124
php_phongo_regex_t *intern;
@@ -133,8 +134,9 @@ PHP_METHOD(Regex, getPattern)
133134
PHONGO_RETURN_STRINGL(intern->pattern, intern->pattern_len);
134135
}
135136
/* }}} */
136-
/* {{{ proto void Regex::getFlags()
137-
*/
137+
138+
/* {{{ proto string Regex::getFlags()
139+
*/
138140
PHP_METHOD(Regex, getFlags)
139141
{
140142
php_phongo_regex_t *intern;
@@ -151,7 +153,7 @@ PHP_METHOD(Regex, getFlags)
151153
}
152154
/* }}} */
153155

154-
/* {{{ proto Regex::__set_state(array $properties)
156+
/* {{{ proto void Regex::__set_state(array $properties)
155157
*/
156158
PHP_METHOD(Regex, __set_state)
157159
{
@@ -172,8 +174,8 @@ PHP_METHOD(Regex, __set_state)
172174
}
173175
/* }}} */
174176

175-
/* {{{ proto void Regex::__toString()
176-
*/
177+
/* {{{ proto string Regex::__toString()
178+
Returns a string in the form: /pattern/flags */
177179
PHP_METHOD(Regex, __toString)
178180
{
179181
php_phongo_regex_t *intern;
@@ -194,7 +196,7 @@ PHP_METHOD(Regex, __toString)
194196
}
195197
/* }}} */
196198

197-
/* {{{ proto Regex::__wakeup()
199+
/* {{{ proto void Regex::__wakeup()
198200
*/
199201
PHP_METHOD(Regex, __wakeup)
200202
{
@@ -217,7 +219,7 @@ PHP_METHOD(Regex, __wakeup)
217219
ZEND_BEGIN_ARG_INFO_EX(ai_Regex___construct, 0, 0, 2)
218220
ZEND_ARG_INFO(0, pattern)
219221
ZEND_ARG_INFO(0, flags)
220-
ZEND_END_ARG_INFO();
222+
ZEND_END_ARG_INFO()
221223

222224
ZEND_BEGIN_ARG_INFO_EX(ai_Regex___set_state, 0, 0, 1)
223225
ZEND_ARG_ARRAY_INFO(0, properties, 0)

src/BSON/Serializable.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,11 @@ PHONGO_API zend_class_entry *php_phongo_serializable_ce;
4848

4949
/* {{{ BSON\Serializable */
5050

51-
ZEND_BEGIN_ARG_INFO_EX(ai_serializable_bsonserialize, 0, 0, 0)
52-
ZEND_END_ARG_INFO();
53-
51+
ZEND_BEGIN_ARG_INFO_EX(ai_Serializable_void, 0, 0, 0)
52+
ZEND_END_ARG_INFO()
5453

5554
static zend_function_entry php_phongo_serializable_me[] = {
56-
ZEND_ABSTRACT_ME(Serializable, bsonSerialize, ai_serializable_bsonserialize)
55+
ZEND_ABSTRACT_ME(Serializable, bsonSerialize, ai_Serializable_void)
5756
PHP_FE_END
5857
};
5958

src/BSON/Timestamp.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,9 @@ static bool php_phongo_timestamp_init_from_hash(php_phongo_timestamp_t *intern,
9191
return false;
9292
}
9393

94-
/* {{{ proto BSON\Timestamp Timestamp::__construct(integer $increment, int $timestamp)
95-
Construct a new BSON Timestamp (4bytes increment, 4bytes timestamp) */
94+
/* {{{ proto void Timestamp::__construct(integer $increment, int $timestamp)
95+
Construct a new BSON timestamp type, which consists of a 4-byte increment and
96+
4-byte timestamp. */
9697
PHP_METHOD(Timestamp, __construct)
9798
{
9899
php_phongo_timestamp_t *intern;
@@ -114,7 +115,7 @@ PHP_METHOD(Timestamp, __construct)
114115
}
115116
/* }}} */
116117

117-
/* {{{ proto Timestamp::__set_state(array $properties)
118+
/* {{{ proto void Timestamp::__set_state(array $properties)
118119
*/
119120
PHP_METHOD(Timestamp, __set_state)
120121
{
@@ -136,7 +137,7 @@ PHP_METHOD(Timestamp, __set_state)
136137
/* }}} */
137138

138139
/* {{{ proto string Timestamp::__toString()
139-
Returns [increment:timestamp] */
140+
Returns a string in the form: [increment:timestamp] */
140141
PHP_METHOD(Timestamp, __toString)
141142
{
142143
php_phongo_timestamp_t *intern;
@@ -156,7 +157,7 @@ PHP_METHOD(Timestamp, __toString)
156157
}
157158
/* }}} */
158159

159-
/* {{{ proto Timestamp::__wakeup()
160+
/* {{{ proto void Timestamp::__wakeup()
160161
*/
161162
PHP_METHOD(Timestamp, __wakeup)
162163
{
@@ -179,7 +180,7 @@ PHP_METHOD(Timestamp, __wakeup)
179180
ZEND_BEGIN_ARG_INFO_EX(ai_Timestamp___construct, 0, 0, 2)
180181
ZEND_ARG_INFO(0, increment)
181182
ZEND_ARG_INFO(0, timestamp)
182-
ZEND_END_ARG_INFO();
183+
ZEND_END_ARG_INFO()
183184

184185
ZEND_BEGIN_ARG_INFO_EX(ai_Timestamp___set_state, 0, 0, 1)
185186
ZEND_ARG_ARRAY_INFO(0, properties, 0)

0 commit comments

Comments
 (0)