public function isFiltered(UriInterface $currentUri, UriInterface $startUri)
    {
        /* @var $currentUri Uri */
        /* @var $startUri Uri */

        $startDomainElements = explode('.', $startUri->getHost());
        $currentDomainElements = explode('.', $currentUri->getHost());

        $startDomainLength = count($startDomainElements);
        $currentDomainLength = count($currentDomainElements);

        if ($currentDomainLength < $startDomainLength) {
            return true;
        }

        return $currentUri->getHost($startDomainLength) !== $startUri->getHost($startDomainLength);
    }
public function isFiltered(UriInterface $currentUri, UriInterface $startUri)
    {
        /* @var $currentUri Uri */
        /* @var $startUri Uri */

        $startDomainElements = explode('.', $startUri->getHost());
        $currentDomainElements = explode('.', $currentUri->getHost());

        $startDomainLength = count($startDomainElements);
        $currentDomainLength = count($currentDomainElements);

        if ($currentDomainLength < $startDomainLength) {
            return true;
        }

        return $currentUri->getHost($startDomainLength) !== $startUri->getHost($startDomainLength);
    }
public function isFiltered ( UriInterface $ currentUri , UriInterface $ startUri ) { /* @var $currentUri Uri */ /* @var $startUri Uri */ $ startDomainElements = explode ( '.' , $ startUri -> getHost ( ) ) ; $ currentDomainElements = explode ( '.' , $ currentUri -> getHost ( ) ) ; $ startDomainLength = count ( $ startDomainElements ) ; $ currentDomainLength = count ( $ currentDomainElements ) ; if ( $ currentDomainLength < $ startDomainLength ) { return true ; } return $ currentUri -> getHost ( $ startDomainLength ) !== $ startUri -> getHost ( $ startDomainLength ) ; }
Filter foreign domains before request is fired

@param UriInterface $currentUri
@param UriInterface $startUri
@return bool
Filter foreign domains before request is fired