odata/library/ODataProducer/HttpProcessUtility.php
/**
     * Converts the specified character from the ASCII range to a digit.
     * 
     * @param char $c Character to convert
     *
     * @return int The Int32 value for $c, or -1 if it is an element separator.
     *
     * @throws HttpHeaderFailure If $c is not ASCII value for digit or element
     *                           seperator.
     */
Converts the specified character from the ASCII range to a digit.

@param char $c Character to convert

@return int The Int32 value for $c, or -1 if it is an element separator.

@throws HttpHeaderFailure If $c is not ASCII value for digit or element
seperator.
Converts the specified character from the ASCII range to a digit . @param char $c Character to convert @return int The Int32 value for $c or - 1 if it is an element separator . @throws HttpHeaderFailure If $c is not ASCII value for digit or element seperator .
public static function digitToInt32($c)
    {
        if ($c >= '0' && $c <= '9') {
                return intval($c);
        } else {
            if (self::isHttpElementSeparator($c)) {
                return -1;
            } else {
                throw new HttpHeaderFailure(
                    Messages::httpProcessUtilityMalformedHeaderValue(), 
                    400
                );
            }
        }
    }
public static function digitToInt32 ( $ c ) { if ( $ c >= '0' && $ c <= '9' ) { return intval ( $ c ) ; } else { if ( self :: isHttpElementSeparator ( $ c ) ) { return - 1 ; } else { throw new HttpHeaderFailure ( Messages :: httpProcessUtilityMalformedHeaderValue ( ) , 400 ) ; } } }
Converts the specified character from the ASCII range to a digit.
Converts the specified character from the ASCII range to a digit .