Overview

Packages

  • None
  • thrift
    • transport

Classes

  • TBufferedTransport
  • TFramedTransport
  • THttpClient
  • TMemoryBuffer
  • TNullTransport
  • TPhpStream
  • TSocket
  • TSocketPool
  • TTransport
  • Overview
  • Package
  • Class
  • Tree
 1: <?php
 2: 
 3: /**
 4:  * Copyright (c) 2006- Facebook
 5:  * Distributed under the Thrift Software License
 6:  *
 7:  * See accompanying file LICENSE or visit the Thrift site at:
 8:  * http://developers.facebook.com/thrift/
 9:  *
10:  * @package thrift.transport
11:  * @author Mark Slee <mcslee@facebook.com>
12:  */
13: 
14: /**
15:  * Transport that only accepts writes and ignores them.
16:  * This is useful for measuring the serialized size of structures.
17:  *
18:  * @package thrift.transport
19:  * @author David Reiss <dreiss@facebook.com>
20:  */
21: class TNullTransport extends TTransport {
22: 
23:   public function isOpen() {
24:     return true;
25:   }
26: 
27:   public function open() {}
28: 
29:   public function close() {}
30: 
31:   public function read($len) {
32:     throw new TTransportException("Can't read from TNullTransport.");
33:   }
34: 
35:   public function write($buf) {}
36: 
37: }
38: 
39: ?>
40: 
API documentation generated by ApiGen