/** * Use the JSON encoding scheme for the value specified * * @param mixed $value The value to be encoded * @param boolean $cycleCheck Whether or not to check for possible object recursion when encoding * @param array $options Additional options used during encoding * @return string The encoded value */ public static function encode($value, $cycleCheck = false, $options = array()) { $encoder = new self($cycleCheck ? true : false, $options); return $encoder->_encodeValue($value); }
/** * encode data into ubson format * @param mixed $value * @return string */ public static function encode($value) { $ubjson = new self($value); return $ubjson->_encodeValue($value); }