src/POData/UriProcessor/RequestDescription.php
/**
     * This function is used to perform following checking (validation)
     * for capability negotiation.
     *  (1) Check client request's 'DataServiceVersion' header value is 
     *      less than or equal to the minimum version required to intercept
     *      the response
     *  (2) Check client request's 'MaxDataServiceVersion' header value is
     *      less than or equal to the version of protocol required to generate
     *      the response
     *  (3) Check the configured maximum protocol version is less than or equal 
     *      to the version of protocol required to generate the response
     *  In addition to these checking, this function is also responsible for
     *  initializing the properties representing 'DataServiceVersion' and
     *  'MaxDataServiceVersion'.
     *  
     *
     * @throws ODataException If any of the above 3 check fails.
     */
This function is used to perform following checking (validation)
for capability negotiation.

@throws ODataException If any of the above 3 check fails.
This function is used to perform following checking ( validation ) for capability negotiation . @throws ODataException If any of the above 3 check fails .
public function validateVersions() {
        if ($this->requestVersion->compare($this->requiredMinRequestVersion) < 0) {
			throw ODataException::createBadRequestError(
                Messages::requestVersionTooLow(
	                $this->requestVersion->toString(),
	                $this->requiredMinRequestVersion->toString()
                )
            );
        }
        if ($this->requestMaxVersion->compare($this->requiredMinResponseVersion) < 0) {
			throw ODataException::createBadRequestError(
                Messages::requestVersionTooLow(
	                $this->requestMaxVersion->toString(),
	                $this->requiredMinResponseVersion->toString()
                )
            );
        }
        if ($this->maxServiceVersion->compare($this->requiredMinResponseVersion) < 0) {
			throw ODataException::createBadRequestError(
                Messages::requestVersionIsBiggerThanProtocolVersion(
	                $this->requiredMinResponseVersion->toString(),
	                $this->maxServiceVersion->toString()
                )
            );
        }
    }
public function validateVersions ( ) { if ( $ this -> requestVersion -> compare ( $ this -> requiredMinRequestVersion ) < 0 ) { throw ODataException :: createBadRequestError ( Messages :: requestVersionTooLow ( $ this -> requestVersion -> toString ( ) , $ this -> requiredMinRequestVersion -> toString ( ) ) ) ; } if ( $ this -> requestMaxVersion -> compare ( $ this -> requiredMinResponseVersion ) < 0 ) { throw ODataException :: createBadRequestError ( Messages :: requestVersionTooLow ( $ this -> requestMaxVersion -> toString ( ) , $ this -> requiredMinResponseVersion -> toString ( ) ) ) ; } if ( $ this -> maxServiceVersion -> compare ( $ this -> requiredMinResponseVersion ) < 0 ) { throw ODataException :: createBadRequestError ( Messages :: requestVersionIsBiggerThanProtocolVersion ( $ this -> requiredMinResponseVersion -> toString ( ) , $ this -> maxServiceVersion -> toString ( ) ) ) ; } }
This function is used to perform following checking (validation)
 for capability negotiation.
This function is used to perform following checking ( validation ) for capability negotiation .
//If the request version is below the minimum version required by supplied request arguments..throw an exception //If the requested max version is below the version required to fulfill the response...throw an exception //If the max version supported by the service is below the version required to fulfill the response..throw an exception