@@ 199-214 (lines=16) @@ | ||
196 | * |
|
197 | * @return int |
|
198 | */ |
|
199 | public static function convertToDelegateFlags($flags = null) |
|
200 | { |
|
201 | if (null === $flags) { |
|
202 | return AMQP_NOPARAM; |
|
203 | } |
|
204 | ||
205 | $converted = 0; |
|
206 | ||
207 | foreach (self::$flagMap as $from => $to) { |
|
208 | if ($flags & $from) { |
|
209 | $converted |= $to; |
|
210 | } |
|
211 | } |
|
212 | ||
213 | return $converted; |
|
214 | } |
|
215 | ||
216 | /** |
|
217 | * @param int|null $flags |
|
@@ 221-236 (lines=16) @@ | ||
218 | * |
|
219 | * @return int |
|
220 | */ |
|
221 | public static function convertFromDelegateFlags($flags = null) |
|
222 | { |
|
223 | if (null === $flags) { |
|
224 | return self::NOPARAM; |
|
225 | } |
|
226 | ||
227 | $converted = 0; |
|
228 | ||
229 | foreach (self::$flagMap as $from => $to) { |
|
230 | if ($flags & $to) { |
|
231 | $converted |= $from; |
|
232 | } |
|
233 | } |
|
234 | ||
235 | return $converted; |
|
236 | } |
|
237 | } |
|
238 |
@@ 255-270 (lines=16) @@ | ||
252 | * |
|
253 | * @return int |
|
254 | */ |
|
255 | public static function convertToDelegateFlags($flags = null) |
|
256 | { |
|
257 | if (null === $flags) { |
|
258 | return AMQP_NOPARAM; |
|
259 | } |
|
260 | ||
261 | $converted = 0; |
|
262 | ||
263 | foreach (self::$flagMap as $from => $to) { |
|
264 | if ($flags & $from) { |
|
265 | $converted |= $to; |
|
266 | } |
|
267 | } |
|
268 | ||
269 | return $converted; |
|
270 | } |
|
271 | ||
272 | /** |
|
273 | * @param int|null $flags |
|
@@ 277-292 (lines=16) @@ | ||
274 | * |
|
275 | * @return int |
|
276 | */ |
|
277 | public static function convertFromDelegateFlags($flags = null) |
|
278 | { |
|
279 | if (null === $flags) { |
|
280 | return self::NOPARAM; |
|
281 | } |
|
282 | ||
283 | $converted = 0; |
|
284 | ||
285 | foreach (self::$flagMap as $from => $to) { |
|
286 | if ($flags & $to) { |
|
287 | $converted |= $from; |
|
288 | } |
|
289 | } |
|
290 | ||
291 | return $converted; |
|
292 | } |
|
293 | } |
|
294 |