src/Utility/LinkScanner.php
protected function canBeScanned($url)
    {
        if (!is_url($url) || in_array($url, $this->alreadyScanned) ||
            (!$this->getConfig('externalLinks') && is_external_url($url, $this->hostname))) {
            return false;
        }

        foreach ((array)$this->getConfig('excludeLinks') as $pattern) {
            if (preg_match($pattern, $url)) {
                return false;
            }
        }

        return true;
    }
protected function canBeScanned($url)
    {
        if (!is_url($url) || in_array($url, $this->alreadyScanned) ||
            (!$this->getConfig('externalLinks') && is_external_url($url, $this->hostname))) {
            return false;
        }

        foreach ((array)$this->getConfig('excludeLinks') as $pattern) {
            if (preg_match($pattern, $url)) {
                return false;
            }
        }

        return true;
    }
protected function canBeScanned ( $ url ) { if ( ! is_url ( $ url ) || in_array ( $ url , $ this -> alreadyScanned ) || ( ! $ this -> getConfig ( 'externalLinks' ) && is_external_url ( $ url , $ this -> hostname ) ) ) { return false ; } foreach ( ( array ) $ this -> getConfig ( 'excludeLinks' ) as $ pattern ) { if ( preg_match ( $ pattern , $ url ) ) { return false ; } } return true ; }
Checks if an url can be scanned.

Returns false if:
- the url has already been scanned;
- it's an external url and the external url scan has been disabled;
- the url matches the url patterns to be excluded.
@param string $url Url to check
@return bool
@uses $alreadyScanned
@uses $hostname
Checks if an url can be scanned .