1 | <?php |
||
16 | final class Queue implements QueueInterface |
||
|
|||
17 | { |
||
18 | /** |
||
19 | * Maximum millisecond value to use for UTCDateTime creation. |
||
20 | * |
||
21 | * @var integer |
||
22 | */ |
||
23 | const MONGO_INT32_MAX = PHP_INT_MAX; |
||
24 | |||
25 | /** |
||
26 | * mongo collection to use for queue. |
||
27 | * |
||
28 | * @var \MongoDB\Collection |
||
29 | */ |
||
30 | private $collection; |
||
31 | |||
32 | /** |
||
33 | * Construct queue. |
||
34 | * |
||
35 | * @param \MongoDB\Collection|string $collectionOrUrl A MongoCollection instance or the mongo connection url. |
||
36 | * @param string $db the mongo db name |
||
37 | * @param string $collection the collection name to use for the queue |
||
38 | * |
||
39 | * @throws \InvalidArgumentException $collectionOrUrl, $db or $collection was not a string |
||
40 | */ |
||
41 | public function __construct($collectionOrUrl, string $db = null, string $collection = null) |
||
60 | } |
||
61 |