1 | <?php |
||
15 | class URLChecker implements URLCheckerInterface |
||
16 | { |
||
17 | use LoggerAwareTrait; |
||
18 | |||
19 | /** |
||
20 | * @var \eZ\Publish\API\Repository\URLService |
||
21 | */ |
||
22 | protected $urlService; |
||
23 | |||
24 | /** |
||
25 | * @var \eZ\Bundle\EzPublishCoreBundle\URLChecker\URLHandlerRegistryInterface |
||
26 | */ |
||
27 | protected $handlerRegistry; |
||
28 | |||
29 | /** |
||
30 | * URLChecker constructor. |
||
31 | * |
||
32 | * @param \eZ\Publish\API\Repository\URLService $urlService |
||
33 | * @param \eZ\Bundle\EzPublishCoreBundle\URLChecker\URLHandlerRegistryInterface $handlerRegistry |
||
34 | */ |
||
35 | public function __construct( |
||
43 | |||
44 | /** |
||
45 | * {@inheritdoc} |
||
46 | */ |
||
47 | public function check(URLQuery $query) |
||
60 | |||
61 | /** |
||
62 | * Fetch URLs to check. |
||
63 | * |
||
64 | * @param \eZ\Publish\API\Repository\Values\URL\URLQuery $query |
||
65 | * @return array |
||
66 | */ |
||
67 | protected function fetchUrls(URLQuery $query) |
||
73 | |||
74 | /** |
||
75 | * Group URLs by schema. |
||
76 | * |
||
77 | * @param \eZ\Publish\API\Repository\Values\URL\SearchResult $urls |
||
78 | * @return array |
||
79 | */ |
||
80 | private function groupByScheme(SearchResult $urls) |
||
99 | } |
||
100 |
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: