src/POData/Providers/Stream/StreamProviderWrapper.php
/**
     * Checks the given value is a valid eTag.
     * 
     * @param string  $etag            eTag to validate.
     * @param boolean $allowStrongEtag True if strong eTag is allowed 
     *                                 False otherwise.
     * 
     * @return boolean
     */
Checks the given value is a valid eTag.

@param string  $etag            eTag to validate.
@param boolean $allowStrongEtag True if strong eTag is allowed
False otherwise.

@return boolean
Checks the given value is a valid eTag . @param string $etag eTag to validate . @param boolean $allowStrongEtag True if strong eTag is allowed False otherwise . @return boolean
public static function isETagValueValid($etag, $allowStrongEtag)
    {
        if (is_null($etag) || $etag === '*') {
            return true;
        }
        $etagValueStartIndex = 1;
        $eTagLength = strlen($etag);
        if (strpos($etag, "W/\"") === 0 && $etag[$eTagLength - 1] == '"') {
            $etagValueStartIndex = 3;
        } else if (!$allowStrongEtag || $etag[0] != '"' 
            || $etag[$eTagLength - 1] != '"'
        ) {
            return false;
        }
        for ($i = $etagValueStartIndex; $i < $eTagLength - 1; $i++) {
            if ($etag[$i] == '"') {
                return false;
            }
        }
        return true;
    }
public static function isETagValueValid ( $ etag , $ allowStrongEtag ) { if ( is_null ( $ etag ) || $ etag === '*' ) { return true ; } $ etagValueStartIndex = 1 ; $ eTagLength = strlen ( $ etag ) ; if ( strpos ( $ etag , " W/ \" " ) === 0 && $ etag [ $ eTagLength - 1 ] == '"' ) { $ etagValueStartIndex = 3 ; } else if ( ! $ allowStrongEtag || $ etag [ 0 ] != '"' || $ etag [ $ eTagLength - 1 ] != '"' ) { return false ; } for ( $ i = $ etagValueStartIndex ; $ i < $ eTagLength - 1 ; $ i ++ ) { if ( $ etag [ $ i ] == '"' ) { return false ; } } return true ; }
Checks the given value is a valid eTag.
Checks the given value is a valid eTag .
// HTTP RFC 2616, section 3.11: //   entity-tag = [ weak ] opaque-tag //   weak       = "W/" //   opaque-tag = quoted-string // Format of etag looks something like: W/"etag property values"  // or "strong etag value" according to HTTP RFC 2616, if someone  // wants to specify more than 1 etag value, then need to specify  // something like this: W/"etag values", W/"etag values", ... // To make sure only one etag is specified, we need to ensure  // that if " is part of the key value, it needs to be escaped.