Class Amazon_SimpleDB_Util

Description

Amazon_SimpleDB_Util Provides collection of static functions for conversion of various values into strings that may be compared lexicographically.

Located in /Util.php (line 27)


	
			
Method Summary
static original decodeDate (string $value)
static flaot decodeRealNumberRangeFloat (string $value, integer $maxDigitsRight, integer $offsetValue)
static integer decodeRealNumberRangeInt (string $value, integer $offsetValue)
static float decodeZeroPaddingFloat (string $value)
static integer decodeZeroPaddingInt (string $value)
static string encodeDate ([float $microtimestamp = NULL])
static string encodeRealNumberRange (integer|float $number, integer $maxDigitsLeft, [integer $maxDigitsRight = 0], [integer $offsetValue = 0])
static string encodeZeroPadding (integer|float $number, integer $maxNumDigits)
Methods
static method decodeDate (line 134)

Decodes date value from the string representation created using encodeDate(..) function.

  • return: date value in microtime format
  • access: public
static original decodeDate (string $value)
  • string $value: representation of the date value
static method decodeRealNumberRangeFloat (line 102)

Decodes float value from the string representation that was created by using encodeRealNumberRange(..) function.

  • return: original floating point value
  • access: public
static flaot decodeRealNumberRangeFloat (string $value, integer $maxDigitsRight, integer $offsetValue)
  • string $value: representation of the floating point value
  • integer $maxDigitsRight: maximum number of digits left of the decimal point in the largest absolute value in the data set (must be the same as the one used for encoding).
  • integer $offsetValue: offset value that was used in the original encoding
static method decodeRealNumberRangeInt (line 90)

Decodes integer value from the string representation that was created by using encodeRealNumberRange(..) function.

  • return: original integer value
  • access: public
static integer decodeRealNumberRangeInt (string $value, integer $offsetValue)
  • string $value: representation of the integer value
  • integer $offsetValue: offset value that was used in the original encoding
static method decodeZeroPaddingFloat (line 62)

Decodes zero-padded positive float value from the string representation

  • return: original float value
  • access: public
static float decodeZeroPaddingFloat (string $value)
  • string $value: zero-padded string representation of the float value
static method decodeZeroPaddingInt (line 52)

Decodes zero-padded positive integer value from the string representation

  • return: original integer value
  • access: public
static integer decodeZeroPaddingInt (string $value)
  • string $value: zero-padded string representation of the integer
static method encodeDate (line 112)

Encodes date value into string format that can be compared lexicographically

  • return: representation of the date value
  • access: public
static string encodeDate ([float $microtimestamp = NULL])
  • float $microtimestamp: date value to be encoded (microtime format - local timezone)
static method encodeRealNumberRange (line 78)

Encodes real number value into a string by offsetting and zero-padding number up to the specified number of digits. Use this encoding method if the data range set includes both positive and negative values.

This function handles both float and int values.

  • return: representation of the integer
  • access: public
static string encodeRealNumberRange (integer|float $number, integer $maxDigitsLeft, [integer $maxDigitsRight = 0], [integer $offsetValue = 0])
  • integer|float $number: real number to be encoded
  • integer $maxDigitsLeft: maximum number of digits left of the decimal point in the largest absolute value in the data set
  • integer $maxDigitsRight: maximum number of digits right of the decimal point in the largest absolute value in the data set, i.e. precision
  • integer $offsetValue: offset value, has to be greater than absolute value of any negative number in the data set.
static method encodeZeroPadding (line 37)

Encodes a positive integer or floating point value into a string by zero-padding number up to the specified number of digits.

  • return: representation of the zero-padded integer or floating point value
  • access: public
static string encodeZeroPadding (integer|float $number, integer $maxNumDigits)
  • integer|float $number: positive integer or floating point value to be encoded
  • integer $maxNumDigits: maximum number of digits in the largest value in the data set

Documentation generated on Thu, 28 Aug 2008 06:35:56 -0700 by phpDocumentor 1.4.2