Example #1
0
 /**
  * decode ubjson format
  * 
  * @param string $source
  * @param int $decodeType
  * @return mixed
  */
 public static function decode($source, $decodeType = self::TYPE_ARRAY, $throwException = true)
 {
     $ubjson = new self($source);
     $ubjson->setDecodeType($decodeType);
     $ubjson->_getNextToken();
     $ubjson->setThrowException($throwException);
     $ubjson->cleanLastErrorMessage();
     return $ubjson->_decodeValue();
 }