private function deriveHost() { if (!$this->absoluteUrl->hasHost()) { if ($this->sourceUrl->hasHost()) { $this->absoluteUrl->setHost($this->sourceUrl->getHost()); } } }
/** * * @param array $refDomains * @return array */ private function getExpectedErrorValuesByRefDomain($refDomains = array()) { $expectedErrorValues = array(); foreach ($this->expectedErrorValues as $errorValueSet) { $errorValueSetRefUrl = new NormalisedUrl($errorValueSet['ref']); if (in_array((string) $errorValueSetRefUrl->getHost(), $refDomains)) { $expectedErrorValues[] = $errorValueSet; } } return $expectedErrorValues; }
/** * * @param NormalisedUrl $url * @return boolean */ private function isUrlDomainToBeIncluded(NormalisedUrl $url) { return !in_array($url->getHost(), $this->getConfiguration()->getDomainsToExclude()); }