1 | <?php |
||
12 | class Locator |
||
13 | { |
||
14 | |||
15 | /** @var \Buttress\Concrete\Locator\Site */ |
||
16 | protected $location; |
||
17 | |||
18 | /** @var Detector[] */ |
||
19 | protected $detectors = []; |
||
20 | |||
21 | /** @var \Buttress\Concrete\Locator\WebrootLocator */ |
||
22 | protected $locator; |
||
23 | |||
24 | 12 | public function __construct(WebrootLocator $locator, ModernDetector $modern, LegacyDetector $legacy) |
|
30 | |||
31 | /** |
||
32 | * Add a detector to detect with |
||
33 | * |
||
34 | * @param \Buttress\Concrete\Locator\Detector\Detector $detector |
||
35 | */ |
||
36 | 12 | public function addDetector(Detector $detector) |
|
40 | |||
41 | /** |
||
42 | * Locate the concrete5 core we're wanting |
||
43 | * |
||
44 | * @param string|null $currentPath If null is passed, getcwd will be used. |
||
45 | * @param bool $recursive |
||
46 | * @return \Buttress\Concrete\Locator\Site|null |
||
47 | 9 | */ |
|
48 | public function getLocation($currentPath = null, $recursive = true) |
||
67 | } |
||
68 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
string
values, the empty string''
is a special case, in particular the following results might be unexpected: