1 | <?php |
||
26 | class Near extends Specification |
||
27 | { |
||
28 | const DEFAULT_RADIUS = 50000; //m |
||
29 | |||
30 | /** |
||
31 | * @var SelectorInterface |
||
32 | */ |
||
33 | protected $selector; |
||
34 | |||
35 | /** |
||
36 | * @var Coordinate |
||
37 | */ |
||
38 | protected $coordinate; |
||
39 | |||
40 | /** |
||
41 | * @var Distance |
||
42 | */ |
||
43 | protected $radius; |
||
44 | |||
45 | /** |
||
46 | * @param SelectorInterface $selector |
||
47 | * @param Coordinate $coordinate |
||
48 | * @param Distance $radius |
||
49 | */ |
||
50 | public function __construct(SelectorInterface $selector, Coordinate $coordinate, Distance $radius = null) |
||
58 | |||
59 | /** |
||
60 | * @return \Cubiche\Domain\Specification\SelectorInterface |
||
61 | */ |
||
62 | public function selector() |
||
66 | |||
67 | /** |
||
68 | * @return \Cubiche\Domain\Geolocation\Coordinate |
||
69 | */ |
||
70 | public function coordinate() |
||
74 | |||
75 | /** |
||
76 | * @return \Cubiche\Domain\Geolocation\Distance |
||
77 | */ |
||
78 | public function radius() |
||
82 | |||
83 | /** |
||
84 | * {@inheritdoc} |
||
85 | */ |
||
86 | public function evaluate($value) |
||
101 | } |
||
102 |