1 | <?php |
||
23 | class MongoRegex implements TypeInterface |
||
24 | { |
||
25 | /** |
||
26 | * @var string |
||
27 | */ |
||
28 | public $regex; |
||
29 | |||
30 | /** |
||
31 | * @var string |
||
32 | */ |
||
33 | public $flags; |
||
34 | |||
35 | /** |
||
36 | * Creates a new regular expression. |
||
37 | * |
||
38 | * @link http://php.net/manual/en/mongoregex.construct.php |
||
39 | * @param string|Regex $regex Regular expression string of the form /expr/flags |
||
40 | */ |
||
41 | public function __construct($regex) |
||
56 | |||
57 | /** |
||
58 | * Returns a string representation of this regular expression. |
||
59 | * @return string This regular expression in the form "/expr/flags". |
||
60 | */ |
||
61 | public function __toString() |
||
65 | |||
66 | /** |
||
67 | * Converts this MongoRegex to the new BSON Regex type |
||
68 | * |
||
69 | * @return Regex |
||
70 | * @internal This method is not part of the ext-mongo API |
||
71 | */ |
||
72 | public function toBSONType() |
||
76 | } |
||
77 |