public function validatePath($path = null)
    {
        if ($path === null) {
            $path = $this->_path;
        }

        // If the path is empty, then it is considered valid
        if (strlen($path) === 0) {
            return true;
        }

        // Determine whether the path is well-formed
        $pattern = '/^' . $this->_regex['path'] . '$/';
        $status  = @preg_match($pattern, $path);
        if ($status === false) {
            require_once 'Zend/Uri/Exception.php';
            throw new Zend_Uri_Exception('Internal error: path validation failed');
        }

        return (boolean) $status;
    }
public function validatePath($path = null)
    {
        if ($path === null) {
            $path = $this->_path;
        }

        // If the path is empty, then it is considered valid
        if (strlen($path) === 0) {
            return true;
        }

        // Determine whether the path is well-formed
        $pattern = '/^' . $this->_regex['path'] . '$/';
        $status  = @preg_match($pattern, $path);
        if ($status === false) {
            require_once 'Zend/Uri/Exception.php';
            throw new Zend_Uri_Exception('Internal error: path validation failed');
        }

        return (boolean) $status;
    }
public function validatePath ( $ path = null ) { if ( $ path === null ) { $ path = $ this -> _path ; } // If the path is empty, then it is considered valid if ( strlen ( $ path ) === 0 ) { return true ; } // Determine whether the path is well-formed $ pattern = '/^' . $ this -> _regex [ 'path' ] . '$/' ; $ status = @ preg_match ( $ pattern , $ path ) ; if ( $ status === false ) { require_once 'Zend/Uri/Exception.php' ; throw new Zend_Uri_Exception ( 'Internal error: path validation failed' ) ; } return ( boolean ) $ status ; }
Returns true if and only if the path string passes validation. If no path is passed,
then the path contained in the instance variable is used.

@param  string $path The HTTP path
@throws Zend_Uri_Exception When path validation fails
@return boolean
Returns true if and only if the path string passes validation . If no path is passed then the path contained in the instance variable is used .