protected function isValidUrl($url)
    {
        $valid = false;

        $parseUrl = parse_url($url);

        if(isset($parseUrl['host']) || !empty($parseUrl['host'])) {

            $uri = new \Zend\Validator\Uri();
            if ($uri->isValid($url)) {
                $valid = true;
            }
            else {
                $valid = false;
            }
        }

        return $valid;
    }
protected function isValidUrl($url)
    {
        $valid = false;

        $parseUrl = parse_url($url);

        if(isset($parseUrl['host']) || !empty($parseUrl['host'])) {

            $uri = new \Zend\Validator\Uri();
            if ($uri->isValid($url)) {
                $valid = true;
            }
            else {
                $valid = false;
            }
        }

        return $valid;
    }
protected function isValidUrl ( $ url ) { $ valid = false ; $ parseUrl = parse_url ( $ url ) ; if ( isset ( $ parseUrl [ 'host' ] ) || ! empty ( $ parseUrl [ 'host' ] ) ) { $ uri = new \ Zend \ Validator \ Uri ( ) ; if ( $ uri -> isValid ( $ url ) ) { $ valid = true ; } else { $ valid = false ; } } return $ valid ; }
Make sure we have a valid URL when accessing a page

@param string $url
Make sure we have a valid URL when accessing a page