1 | <?php |
||
22 | class MongoCode implements \Alcaeus\MongoDbAdapter\TypeInterface |
||
23 | { |
||
24 | /** |
||
25 | * @var string |
||
26 | */ |
||
27 | private $code; |
||
28 | |||
29 | /** |
||
30 | * @var array |
||
31 | */ |
||
32 | private $scope; |
||
33 | |||
34 | /** |
||
35 | * @link http://php.net/manual/en/mongocode.construct.php |
||
36 | * @param string $code A string of code |
||
37 | * @param array $scope The scope to use for the code |
||
38 | */ |
||
39 | public function __construct($code, array $scope = []) |
||
50 | |||
51 | /** |
||
52 | * Returns this code as a string |
||
53 | * @return string |
||
54 | */ |
||
55 | public function __toString() |
||
59 | |||
60 | /** |
||
61 | * Converts this MongoCode to the new BSON JavaScript type |
||
62 | * |
||
63 | * @return \MongoDB\BSON\Javascript |
||
64 | * @internal This method is not part of the ext-mongo API |
||
65 | */ |
||
66 | public function toBSONType() |
||
70 | } |
||
71 |