blob: 833f2132df8a061f2cc4f8e3893b57b8d55bf4ce [file] [log] [blame]
Mark Slee4902c052007-03-01 00:31:30 +00001<?php
dweatherford80940b72007-10-31 23:30:56 +00002include_once $GLOBALS['THRIFT_ROOT'].'/transport/TBufferedTransport.php';
Mark Slee4902c052007-03-01 00:31:30 +00003
4/**
5 * Copyright (c) 2006- Facebook
6 * Distributed under the Thrift Software License
7 *
8 * See accompanying file LICENSE or visit the Thrift site at:
9 * http://developers.facebook.com/thrift/
10 *
11 * @package thrift.protocol
Mark Slee4902c052007-03-01 00:31:30 +000012 */
Mark Slee6e536442006-06-30 18:28:50 +000013
Mark Slee6e536442006-06-30 18:28:50 +000014/**
15 * Binary implementation of the Thrift protocol.
16 *
Mark Slee6e536442006-06-30 18:28:50 +000017 */
18class TBinaryProtocol extends TProtocol {
19
Mark Slee808454e2007-06-20 21:51:57 +000020 const VERSION_MASK = 0xffff0000;
21 const VERSION_1 = 0x80010000;
22
dweatherfordcf997a42008-03-04 01:08:23 +000023 protected $strictRead_ = false;
24 protected $strictWrite_ = true;
Mark Slee808454e2007-06-20 21:51:57 +000025
26 public function __construct($trans, $strictRead=false, $strictWrite=true) {
Aditya Agarwal6a5bcaa2007-02-06 02:50:56 +000027 parent::__construct($trans);
Mark Slee808454e2007-06-20 21:51:57 +000028 $this->strictRead_ = $strictRead;
29 $this->strictWrite_ = $strictWrite;
Mark Slee5f8237d2006-10-26 04:57:03 +000030 }
31
32 public function writeMessageBegin($name, $type, $seqid) {
Mark Slee808454e2007-06-20 21:51:57 +000033 if ($this->strictWrite_) {
34 $version = self::VERSION_1 | $type;
35 return
36 $this->writeI32($version) +
37 $this->writeString($name) +
38 $this->writeI32($seqid);
39 } else {
Mark Slee276eea62007-11-20 02:06:47 +000040 return
Mark Slee808454e2007-06-20 21:51:57 +000041 $this->writeString($name) +
42 $this->writeByte($type) +
43 $this->writeI32($seqid);
44 }
Marc Slemkod97eb612006-08-24 23:37:36 +000045 }
46
Mark Slee5f8237d2006-10-26 04:57:03 +000047 public function writeMessageEnd() {
Marc Slemkod97eb612006-08-24 23:37:36 +000048 return 0;
49 }
50
Mark Slee5f8237d2006-10-26 04:57:03 +000051 public function writeStructBegin($name) {
Mark Slee6e536442006-06-30 18:28:50 +000052 return 0;
53 }
54
Mark Slee5f8237d2006-10-26 04:57:03 +000055 public function writeStructEnd() {
Mark Slee6e536442006-06-30 18:28:50 +000056 return 0;
57 }
58
Mark Slee5f8237d2006-10-26 04:57:03 +000059 public function writeFieldBegin($fieldName, $fieldType, $fieldId) {
Mark Slee6e536442006-06-30 18:28:50 +000060 return
Mark Slee5f8237d2006-10-26 04:57:03 +000061 $this->writeByte($fieldType) +
62 $this->writeI16($fieldId);
Mark Slee6e536442006-06-30 18:28:50 +000063 }
64
Mark Slee5f8237d2006-10-26 04:57:03 +000065 public function writeFieldEnd() {
Mark Slee6e536442006-06-30 18:28:50 +000066 return 0;
Mark Slee808454e2007-06-20 21:51:57 +000067 }
Mark Slee6e536442006-06-30 18:28:50 +000068
Mark Slee5f8237d2006-10-26 04:57:03 +000069 public function writeFieldStop() {
Mark Slee6e536442006-06-30 18:28:50 +000070 return
Mark Slee5f8237d2006-10-26 04:57:03 +000071 $this->writeByte(TType::STOP);
Mark Slee6e536442006-06-30 18:28:50 +000072 }
73
Mark Slee5f8237d2006-10-26 04:57:03 +000074 public function writeMapBegin($keyType, $valType, $size) {
Mark Slee6e536442006-06-30 18:28:50 +000075 return
Mark Slee5f8237d2006-10-26 04:57:03 +000076 $this->writeByte($keyType) +
77 $this->writeByte($valType) +
78 $this->writeI32($size);
Mark Slee6e536442006-06-30 18:28:50 +000079 }
80
Mark Slee5f8237d2006-10-26 04:57:03 +000081 public function writeMapEnd() {
Mark Slee6e536442006-06-30 18:28:50 +000082 return 0;
83 }
84
Mark Slee5f8237d2006-10-26 04:57:03 +000085 public function writeListBegin($elemType, $size) {
Mark Slee6e536442006-06-30 18:28:50 +000086 return
Mark Slee5f8237d2006-10-26 04:57:03 +000087 $this->writeByte($elemType) +
88 $this->writeI32($size);
Mark Slee6e536442006-06-30 18:28:50 +000089 }
90
Mark Slee5f8237d2006-10-26 04:57:03 +000091 public function writeListEnd() {
Mark Slee6e536442006-06-30 18:28:50 +000092 return 0;
93 }
94
Mark Slee5f8237d2006-10-26 04:57:03 +000095 public function writeSetBegin($elemType, $size) {
Mark Slee6e536442006-06-30 18:28:50 +000096 return
Mark Slee5f8237d2006-10-26 04:57:03 +000097 $this->writeByte($elemType) +
98 $this->writeI32($size);
Mark Slee6e536442006-06-30 18:28:50 +000099 }
100
Mark Slee5f8237d2006-10-26 04:57:03 +0000101 public function writeSetEnd() {
Mark Slee6e536442006-06-30 18:28:50 +0000102 return 0;
103 }
104
Mark Slee5f8237d2006-10-26 04:57:03 +0000105 public function writeBool($value) {
Marc Slemkod97eb612006-08-24 23:37:36 +0000106 $data = pack('c', $value ? 1 : 0);
Aditya Agarwal6a5bcaa2007-02-06 02:50:56 +0000107 $this->trans_->write($data, 1);
Mark Slee6e536442006-06-30 18:28:50 +0000108 return 1;
109 }
110
Mark Slee5f8237d2006-10-26 04:57:03 +0000111 public function writeByte($value) {
Marc Slemkod97eb612006-08-24 23:37:36 +0000112 $data = pack('c', $value);
Aditya Agarwal6a5bcaa2007-02-06 02:50:56 +0000113 $this->trans_->write($data, 1);
Marc Slemkod97eb612006-08-24 23:37:36 +0000114 return 1;
115 }
116
Mark Slee5f8237d2006-10-26 04:57:03 +0000117 public function writeI16($value) {
Marc Slemkod97eb612006-08-24 23:37:36 +0000118 $data = pack('n', $value);
Aditya Agarwal6a5bcaa2007-02-06 02:50:56 +0000119 $this->trans_->write($data, 2);
Marc Slemkod97eb612006-08-24 23:37:36 +0000120 return 2;
121 }
122
Mark Slee5f8237d2006-10-26 04:57:03 +0000123 public function writeI32($value) {
Marc Slemkod97eb612006-08-24 23:37:36 +0000124 $data = pack('N', $value);
Aditya Agarwal6a5bcaa2007-02-06 02:50:56 +0000125 $this->trans_->write($data, 4);
Mark Slee6e536442006-06-30 18:28:50 +0000126 return 4;
127 }
128
Mark Slee5f8237d2006-10-26 04:57:03 +0000129 public function writeI64($value) {
Mark Sleecfc01932006-09-01 22:18:16 +0000130 // If we are on a 32bit architecture we have to explicitly deal with
131 // 64-bit twos-complement arithmetic since PHP wants to treat all ints
Mark Slee808454e2007-06-20 21:51:57 +0000132 // as signed and any int over 2^31 - 1 as a float
Mark Sleecfc01932006-09-01 22:18:16 +0000133 if (PHP_INT_SIZE == 4) {
Marc Slemkod97eb612006-08-24 23:37:36 +0000134 $neg = $value < 0;
Mark Sleecfc01932006-09-01 22:18:16 +0000135
136 if ($neg) {
Mark Slee808454e2007-06-20 21:51:57 +0000137 $value *= -1;
Marc Slemkod97eb612006-08-24 23:37:36 +0000138 }
Mark Slee808454e2007-06-20 21:51:57 +0000139
Marc Slemkod97eb612006-08-24 23:37:36 +0000140 $hi = (int)($value / 4294967296);
141 $lo = (int)$value;
Mark Slee808454e2007-06-20 21:51:57 +0000142
Mark Sleecfc01932006-09-01 22:18:16 +0000143 if ($neg) {
Mark Slee808454e2007-06-20 21:51:57 +0000144 $hi = ~$hi;
145 $lo = ~$lo;
146 if (($lo & (int)0xffffffff) == (int)0xffffffff) {
147 $lo = 0;
148 $hi++;
149 } else {
150 $lo++;
151 }
Marc Slemkod97eb612006-08-24 23:37:36 +0000152 }
Mark Slee6e536442006-06-30 18:28:50 +0000153 $data = pack('N2', $hi, $lo);
Mark Slee808454e2007-06-20 21:51:57 +0000154
Mark Slee6e536442006-06-30 18:28:50 +0000155 } else {
Marc Slemkod97eb612006-08-24 23:37:36 +0000156 $hi = $value >> 32;
157 $lo = $value & 0xFFFFFFFF;
158 $data = pack('N2', $hi, $lo);
Mark Slee6e536442006-06-30 18:28:50 +0000159 }
Marc Slemkod97eb612006-08-24 23:37:36 +0000160
Aditya Agarwal6a5bcaa2007-02-06 02:50:56 +0000161 $this->trans_->write($data, 8);
Mark Slee6e536442006-06-30 18:28:50 +0000162 return 8;
163 }
164
Mark Slee5f8237d2006-10-26 04:57:03 +0000165 public function writeDouble($value) {
Mark Sleec98d0502006-09-06 02:42:25 +0000166 $data = pack('d', $value);
Aditya Agarwal6a5bcaa2007-02-06 02:50:56 +0000167 $this->trans_->write(strrev($data), 8);
Mark Sleec98d0502006-09-06 02:42:25 +0000168 return 8;
169 }
170
Mark Slee5f8237d2006-10-26 04:57:03 +0000171 public function writeString($value) {
Marc Slemkod97eb612006-08-24 23:37:36 +0000172 $len = strlen($value);
Mark Slee5f8237d2006-10-26 04:57:03 +0000173 $result = $this->writeI32($len);
Mark Sleeade2c832006-09-08 03:41:50 +0000174 if ($len) {
Aditya Agarwal6a5bcaa2007-02-06 02:50:56 +0000175 $this->trans_->write($value, $len);
Mark Sleeade2c832006-09-08 03:41:50 +0000176 }
Mark Slee6e536442006-06-30 18:28:50 +0000177 return $result + $len;
178 }
179
Mark Slee5f8237d2006-10-26 04:57:03 +0000180 public function readMessageBegin(&$name, &$type, &$seqid) {
Mark Slee808454e2007-06-20 21:51:57 +0000181 $result = $this->readI32($sz);
182 if ($sz < 0) {
Mark Slee276eea62007-11-20 02:06:47 +0000183 $version = (int) ($sz & self::VERSION_MASK);
184 if ($version != (int) self::VERSION_1) {
Mark Slee808454e2007-06-20 21:51:57 +0000185 throw new TProtocolException('Bad version identifier: '.$sz, TProtocolException::BAD_VERSION);
186 }
187 $type = $sz & 0x000000ff;
188 $result +=
189 $this->readString($name) +
190 $this->readI32($seqid);
191 } else {
192 if ($this->strictRead_) {
193 throw new TProtocolException('No version identifier, old protocol client?', TProtocolException::BAD_VERSION);
194 } else {
195 // Handle pre-versioned input
196 $name = $this->trans_->readAll($sz);
Mark Slee276eea62007-11-20 02:06:47 +0000197 $result +=
Mark Slee808454e2007-06-20 21:51:57 +0000198 $sz +
199 $this->readByte($type) +
200 $this->readI32($seqid);
201 }
202 }
203 return $result;
Marc Slemkod97eb612006-08-24 23:37:36 +0000204 }
205
Mark Slee5f8237d2006-10-26 04:57:03 +0000206 public function readMessageEnd() {
Marc Slemkod97eb612006-08-24 23:37:36 +0000207 return 0;
208 }
209
Mark Slee5f8237d2006-10-26 04:57:03 +0000210 public function readStructBegin(&$name) {
Mark Slee6e536442006-06-30 18:28:50 +0000211 $name = '';
212 return 0;
213 }
214
Mark Slee5f8237d2006-10-26 04:57:03 +0000215 public function readStructEnd() {
Mark Slee6e536442006-06-30 18:28:50 +0000216 return 0;
217 }
218
Mark Slee5f8237d2006-10-26 04:57:03 +0000219 public function readFieldBegin(&$name, &$fieldType, &$fieldId) {
220 $result = $this->readByte($fieldType);
Mark Slee6e536442006-06-30 18:28:50 +0000221 if ($fieldType == TType::STOP) {
222 $fieldId = 0;
223 return $result;
224 }
Mark Slee5f8237d2006-10-26 04:57:03 +0000225 $result += $this->readI16($fieldId);
Mark Slee6e536442006-06-30 18:28:50 +0000226 return $result;
227 }
228
Mark Slee5f8237d2006-10-26 04:57:03 +0000229 public function readFieldEnd() {
Mark Slee6e536442006-06-30 18:28:50 +0000230 return 0;
231 }
232
Mark Slee5f8237d2006-10-26 04:57:03 +0000233 public function readMapBegin(&$keyType, &$valType, &$size) {
Mark Sleecfc01932006-09-01 22:18:16 +0000234 return
Mark Slee5f8237d2006-10-26 04:57:03 +0000235 $this->readByte($keyType) +
236 $this->readByte($valType) +
237 $this->readI32($size);
Mark Slee6e536442006-06-30 18:28:50 +0000238 }
239
Mark Slee5f8237d2006-10-26 04:57:03 +0000240 public function readMapEnd() {
Mark Slee6e536442006-06-30 18:28:50 +0000241 return 0;
242 }
243
Mark Slee5f8237d2006-10-26 04:57:03 +0000244 public function readListBegin(&$elemType, &$size) {
Mark Sleecfc01932006-09-01 22:18:16 +0000245 return
Mark Slee5f8237d2006-10-26 04:57:03 +0000246 $this->readByte($elemType) +
247 $this->readI32($size);
Mark Slee6e536442006-06-30 18:28:50 +0000248 }
249
Mark Slee5f8237d2006-10-26 04:57:03 +0000250 public function readListEnd() {
Mark Slee6e536442006-06-30 18:28:50 +0000251 return 0;
252 }
253
Mark Slee5f8237d2006-10-26 04:57:03 +0000254 public function readSetBegin(&$elemType, &$size) {
Mark Sleecfc01932006-09-01 22:18:16 +0000255 return
Mark Slee5f8237d2006-10-26 04:57:03 +0000256 $this->readByte($elemType) +
257 $this->readI32($size);
Mark Slee6e536442006-06-30 18:28:50 +0000258 }
259
Mark Slee5f8237d2006-10-26 04:57:03 +0000260 public function readSetEnd() {
Mark Slee6e536442006-06-30 18:28:50 +0000261 return 0;
262 }
263
Mark Slee5f8237d2006-10-26 04:57:03 +0000264 public function readBool(&$value) {
Aditya Agarwal6a5bcaa2007-02-06 02:50:56 +0000265 $data = $this->trans_->readAll(1);
Mark Slee6e536442006-06-30 18:28:50 +0000266 $arr = unpack('c', $data);
Marc Slemkod97eb612006-08-24 23:37:36 +0000267 $value = $arr[1] == 1;
Mark Slee6e536442006-06-30 18:28:50 +0000268 return 1;
269 }
270
Mark Slee5f8237d2006-10-26 04:57:03 +0000271 public function readByte(&$value) {
Aditya Agarwal6a5bcaa2007-02-06 02:50:56 +0000272 $data = $this->trans_->readAll(1);
Marc Slemkod97eb612006-08-24 23:37:36 +0000273 $arr = unpack('c', $data);
274 $value = $arr[1];
275 return 1;
276 }
277
Mark Slee5f8237d2006-10-26 04:57:03 +0000278 public function readI16(&$value) {
Aditya Agarwal6a5bcaa2007-02-06 02:50:56 +0000279 $data = $this->trans_->readAll(2);
Marc Slemkod97eb612006-08-24 23:37:36 +0000280 $arr = unpack('n', $data);
281 $value = $arr[1];
Mark Sleecfc01932006-09-01 22:18:16 +0000282 if ($value > 0x7fff) {
283 $value = 0 - (($value - 1) ^ 0xffff);
Mark Slee6e536442006-06-30 18:28:50 +0000284 }
Marc Slemkod97eb612006-08-24 23:37:36 +0000285 return 2;
286 }
287
Mark Slee5f8237d2006-10-26 04:57:03 +0000288 public function readI32(&$value) {
Aditya Agarwal6a5bcaa2007-02-06 02:50:56 +0000289 $data = $this->trans_->readAll(4);
Marc Slemkod97eb612006-08-24 23:37:36 +0000290 $arr = unpack('N', $data);
291 $value = $arr[1];
Mark Sleecfc01932006-09-01 22:18:16 +0000292 if ($value > 0x7fffffff) {
Marc Slemkod97eb612006-08-24 23:37:36 +0000293 $value = 0 - (($value - 1) ^ 0xffffffff);
294 }
Mark Slee6e536442006-06-30 18:28:50 +0000295 return 4;
296 }
297
Mark Slee5f8237d2006-10-26 04:57:03 +0000298 public function readI64(&$value) {
Aditya Agarwal6a5bcaa2007-02-06 02:50:56 +0000299 $data = $this->trans_->readAll(8);
Marc Slemkod97eb612006-08-24 23:37:36 +0000300
301 $arr = unpack('N2', $data);
Mark Slee808454e2007-06-20 21:51:57 +0000302
Mark Sleecfc01932006-09-01 22:18:16 +0000303 // If we are on a 32bit architecture we have to explicitly deal with
304 // 64-bit twos-complement arithmetic since PHP wants to treat all ints
305 // as signed and any int over 2^31 - 1 as a float
306 if (PHP_INT_SIZE == 4) {
Marc Slemkod97eb612006-08-24 23:37:36 +0000307
308 $hi = $arr[1];
309 $lo = $arr[2];
310 $isNeg = $hi < 0;
Mark Slee276eea62007-11-20 02:06:47 +0000311
Marc Slemkod97eb612006-08-24 23:37:36 +0000312 // Check for a negative
Mark Sleecfc01932006-09-01 22:18:16 +0000313 if ($isNeg) {
David Reiss0c90f6f2008-02-06 22:18:40 +0000314 $hi = ~$hi & (int)0xffffffff;
315 $lo = ~$lo & (int)0xffffffff;
Marc Slemkod97eb612006-08-24 23:37:36 +0000316
David Reiss0c90f6f2008-02-06 22:18:40 +0000317 if ($lo == (int)0xffffffff) {
318 $hi++;
319 $lo = 0;
320 } else {
321 $lo++;
322 }
Marc Slemkod97eb612006-08-24 23:37:36 +0000323 }
324
Mark Sleecfc01932006-09-01 22:18:16 +0000325 // Force 32bit words in excess of 2G to pe positive - we deal wigh sign
326 // explicitly below
Mark Slee276eea62007-11-20 02:06:47 +0000327
Mark Sleecfc01932006-09-01 22:18:16 +0000328 if ($hi & (int)0x80000000) {
David Reiss0c90f6f2008-02-06 22:18:40 +0000329 $hi &= (int)0x7fffffff;
330 $hi += 0x80000000;
Marc Slemkod97eb612006-08-24 23:37:36 +0000331 }
Mark Slee276eea62007-11-20 02:06:47 +0000332
Mark Sleecfc01932006-09-01 22:18:16 +0000333 if ($lo & (int)0x80000000) {
David Reiss0c90f6f2008-02-06 22:18:40 +0000334 $lo &= (int)0x7fffffff;
335 $lo += 0x80000000;
Marc Slemkod97eb612006-08-24 23:37:36 +0000336 }
Mark Slee276eea62007-11-20 02:06:47 +0000337
Marc Slemkod97eb612006-08-24 23:37:36 +0000338 $value = $hi * 4294967296 + $lo;
339
Mark Sleecfc01932006-09-01 22:18:16 +0000340 if ($isNeg) {
David Reiss0c90f6f2008-02-06 22:18:40 +0000341 $value = 0 - $value;
Marc Slemkod97eb612006-08-24 23:37:36 +0000342 }
343 } else {
344
Mark Slee13a0d4a2007-04-03 03:16:11 +0000345 // Upcast negatives in LSB bit
346 if ($arr[2] & 0x80000000) {
347 $arr[2] = $arr[2] & 0xffffffff;
348 }
349
Marc Slemkod97eb612006-08-24 23:37:36 +0000350 // Check for a negative
351 if ($arr[1] & 0x80000000) {
Mark Slee13a0d4a2007-04-03 03:16:11 +0000352 $arr[1] = $arr[1] & 0xffffffff;
353 $arr[1] = $arr[1] ^ 0xffffffff;
354 $arr[2] = $arr[2] ^ 0xffffffff;
355 $value = 0 - $arr[1]*4294967296 - $arr[2] - 1;
Marc Slemkod97eb612006-08-24 23:37:36 +0000356 } else {
Mark Slee13a0d4a2007-04-03 03:16:11 +0000357 $value = $arr[1]*4294967296 + $arr[2];
Marc Slemkod97eb612006-08-24 23:37:36 +0000358 }
359 }
Mark Slee276eea62007-11-20 02:06:47 +0000360
Marc Slemkod97eb612006-08-24 23:37:36 +0000361 return 8;
362 }
363
Mark Slee5f8237d2006-10-26 04:57:03 +0000364 public function readDouble(&$value) {
Aditya Agarwal6a5bcaa2007-02-06 02:50:56 +0000365 $data = strrev($this->trans_->readAll(8));
Mark Sleec98d0502006-09-06 02:42:25 +0000366 $arr = unpack('d', $data);
367 $value = $arr[1];
368 return 8;
369 }
370
Mark Slee5f8237d2006-10-26 04:57:03 +0000371 public function readString(&$value) {
372 $result = $this->readI32($len);
Mark Sleeade2c832006-09-08 03:41:50 +0000373 if ($len) {
Aditya Agarwal6a5bcaa2007-02-06 02:50:56 +0000374 $value = $this->trans_->readAll($len);
Mark Sleeade2c832006-09-08 03:41:50 +0000375 } else {
376 $value = '';
377 }
Mark Slee6e536442006-06-30 18:28:50 +0000378 return $result + $len;
379 }
380}
381
Mark Slee5f8237d2006-10-26 04:57:03 +0000382/**
383 * Binary Protocol Factory
384 */
385class TBinaryProtocolFactory implements TProtocolFactory {
Mark Slee808454e2007-06-20 21:51:57 +0000386 private $strictRead_ = false;
387 private $strictWrite_ = false;
388
389 public function __construct($strictRead=false, $strictWrite=false) {
390 $this->strictRead_ = $strictRead;
391 $this->strictWrite_ = $strictWrite;
Mark Slee276eea62007-11-20 02:06:47 +0000392 }
Mark Slee808454e2007-06-20 21:51:57 +0000393
Aditya Agarwal6a5bcaa2007-02-06 02:50:56 +0000394 public function getProtocol($trans) {
Mark Slee808454e2007-06-20 21:51:57 +0000395 return new TBinaryProtocol($trans, $this->strictRead, $this->strictWrite);
Mark Slee5f8237d2006-10-26 04:57:03 +0000396 }
397}
398
dweatherford80940b72007-10-31 23:30:56 +0000399/**
400 * Accelerated binary protocol: used in conjunction with the thrift_protocol
401 * extension for faster deserialization
402 */
403class TBinaryProtocolAccelerated extends TBinaryProtocol {
404 public function __construct($trans, $strictRead=false, $strictWrite=true) {
405 // If the transport doesn't implement putBack, wrap it in a
406 // TBufferedTransport (which does)
407 if (!method_exists($trans, 'putBack')) {
408 $trans = new TBufferedTransport($trans);
Mark Slee276eea62007-11-20 02:06:47 +0000409 }
dweatherford80940b72007-10-31 23:30:56 +0000410 parent::__construct($trans, $strictRead, $strictWrite);
411 }
dweatherfordcf997a42008-03-04 01:08:23 +0000412 public function isStrictRead() {
413 return $this->strictRead_;
414 }
415 public function isStrictWrite() {
416 return $this->strictWrite_;
417 }
dweatherford80940b72007-10-31 23:30:56 +0000418}
419
Marc Slemkod97eb612006-08-24 23:37:36 +0000420?>