public static function deserialize($str, $object, $disable_hphp_extension = false) { $transport = new TMemoryBuffer(); $protocol = new TBinaryProtocolAccelerated($transport); if (\hacklib_cast_as_boolean(function_exists('thrift_protocol_read_binary')) && !\hacklib_cast_as_boolean($disable_hphp_extension)) { $protocol->writeMessageBegin('', TMessageType::REPLY, 0); $transport->write($str); $object = thrift_protocol_read_binary($protocol, get_class($object), $protocol->isStrictRead()); } else { $transport->write($str); $object->read($protocol); } return $object; }
public static function deserialize($string_object, $class_name) { $transport = new TMemoryBuffer(); $protocol = new TBinaryProtocolAccelerated($transport); if (function_exists('thrift_protocol_read_binary')) { $protocol->writeMessageBegin('', TMessageType::REPLY, 0); $transport->write($string_object); return thrift_protocol_read_binary($protocol, $class_name, $protocol->isStrictRead()); } else { $transport->write($string_object); $object = new $class_name(); $object->read($protocol); return $object; } }
public function __construct($trans, $strict_read = false, $strict_write = true) { parent::__construct($trans, $strict_read, $strict_write); }