protected function doesUrlMatchToAtLeastOnePattern($url, array $patterns)
    {
        foreach ($patterns as $pattern) {
            $regex = '|' . $pattern . '|';
            $this->verbose(
                "Checking url '" . $url . "' with regex '" . $regex . "' -> ",
                OutputInterface::VERBOSITY_VERBOSE
            );
            if (preg_match($regex, $url)) {
                $this->verbose("MATCHED\n", OutputInterface::VERBOSITY_VERBOSE);
                return true;
            } else {
                $this->verbose("NOT matched\n", OutputInterface::VERBOSITY_VERBOSE);
            }
        }
        return false;
    }
protected function doesUrlMatchToAtLeastOnePattern($url, array $patterns)
    {
        foreach ($patterns as $pattern) {
            $regex = '|' . $pattern . '|';
            $this->verbose(
                "Checking url '" . $url . "' with regex '" . $regex . "' -> ",
                OutputInterface::VERBOSITY_VERBOSE
            );
            if (preg_match($regex, $url)) {
                $this->verbose("MATCHED\n", OutputInterface::VERBOSITY_VERBOSE);
                return true;
            } else {
                $this->verbose("NOT matched\n", OutputInterface::VERBOSITY_VERBOSE);
            }
        }
        return false;
    }
protected function doesUrlMatchToAtLeastOnePattern ( $ url , array $ patterns ) { foreach ( $ patterns as $ pattern ) { $ regex = '|' . $ pattern . '|' ; $ this -> verbose ( "Checking url '" . $ url . "' with regex '" . $ regex . "' -> " , OutputInterface :: VERBOSITY_VERBOSE ) ; if ( preg_match ( $ regex , $ url ) ) { $ this -> verbose ( "MATCHED\n" , OutputInterface :: VERBOSITY_VERBOSE ) ; return true ; } else { $ this -> verbose ( "NOT matched\n" , OutputInterface :: VERBOSITY_VERBOSE ) ; } } return false ; }
Will return true, if the given url matches at least one of the given patterns.

@param $url
@param array $patterns
@return bool
Will return true if the given url matches at least one of the given patterns .