forked from angyvolin/mongodb-php-lib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCommand.php
46 lines (38 loc) · 919 Bytes
/
Command.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
namespace Tequila\MongoDB;
use Tequila\MongoDB\OptionsResolver\Command\CompatibilityResolver;
class Command implements CommandInterface
{
/**
* @var array
*/
private $options;
/**
* @var CompatibilityResolver
*/
private $compatibilityResolver;
/**
* @param array $options
*/
public function __construct(array $options)
{
$this->options = $options;
}
/**
* {@inheritdoc}
*/
public function getOptions(Server $server)
{
if (null !== $this->compatibilityResolver) {
$this->compatibilityResolver->resolveCompatibilities($server, $this->options);
}
return $this->options;
}
/**
* @param CompatibilityResolver $resolver
*/
public function setCompatibilityResolver(CompatibilityResolver $resolver)
{
$this->compatibilityResolver = $resolver;
}
}