r1270@dev030 (orig r62462): dreiss | 2007-10-04 16:02:01 -0700
[amiethrift.git] / lib / php / src / transport / TNullTransport.php
blobb24cee5e5088c54f720f78eaa0d7daee5fc70ba7
1 <?php
3 /**
4 * Copyright (c) 2006- Facebook
5 * Distributed under the Thrift Software License
7 * See accompanying file LICENSE or visit the Thrift site at:
8 * http://developers.facebook.com/thrift/
10 * @package thrift.transport
11 * @author Mark Slee <mcslee@facebook.com>
14 /**
15 * Transport that only accepts writes and ignores them.
16 * This is useful for measuring the serialized size of structures.
18 * @package thrift.transport
19 * @author David Reiss <dreiss@facebook.com>
21 class TNullTransport extends TTransport {
23 public function isOpen() {
24 return true;
27 public function open() {}
29 public function close() {}
31 public function read($len) {
32 throw new TTransportException("Can't read from TNullTransport.");
35 public function write($buf) {}