public function getHTTPDepth($default = self::DEPTH_INFINITY)
    {
        // If its not set, we'll grab the default
        $depth = $this->httpRequest->getHeader('Depth');

        if (is_null($depth)) {
            return $default;
        }

        if ('infinity' == $depth) {
            return self::DEPTH_INFINITY;
        }

        // If its an unknown value. we'll grab the default
        if (!ctype_digit($depth)) {
            return $default;
        }

        return (int) $depth;
    }
public function getHTTPDepth($default = self::DEPTH_INFINITY)
    {
        // If its not set, we'll grab the default
        $depth = $this->httpRequest->getHeader('Depth');

        if (is_null($depth)) {
            return $default;
        }

        if ('infinity' == $depth) {
            return self::DEPTH_INFINITY;
        }

        // If its an unknown value. we'll grab the default
        if (!ctype_digit($depth)) {
            return $default;
        }

        return (int) $depth;
    }
public function getHTTPDepth ( $ default = self :: DEPTH_INFINITY ) { // If its not set, we'll grab the default $ depth = $ this -> httpRequest -> getHeader ( 'Depth' ) ; if ( is_null ( $ depth ) ) { return $ default ; } if ( 'infinity' == $ depth ) { return self :: DEPTH_INFINITY ; } // If its an unknown value. we'll grab the default if ( ! ctype_digit ( $ depth ) ) { return $ default ; } return ( int ) $ depth ; }
Returns the HTTP depth header.

This method returns the contents of the HTTP depth request header. If the depth header was 'infinity' it will return the Sabre\DAV\Server::DEPTH_INFINITY object
It is possible to supply a default depth value, which is used when the depth header has invalid content, or is completely non-existent

@param mixed $default

@return int
Returns the HTTP depth header .