Development

Changeset 31262

You must first sign up to be able to contribute.

Changeset 31262

Show
Ignore:
Timestamp:
10/28/10 08:49:37 (3 years ago)
Author:
tomi
Message:

better directory structure

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfThriftPlugin/trunk/lib/protocol/TBinaryProtocol.php

    r31143 r31262  
    388388  } 
    389389} 
    390  
    391 /** 
    392  * Binary Protocol Factory 
    393  */ 
    394 class TBinaryProtocolFactory implements TProtocolFactory { 
    395   private $strictRead_ = false; 
    396   private $strictWrite_ = false; 
    397  
    398   public function __construct($strictRead=false, $strictWrite=false) { 
    399     $this->strictRead_ = $strictRead; 
    400     $this->strictWrite_ = $strictWrite; 
    401   } 
    402  
    403   public function getProtocol($trans) { 
    404     return new TBinaryProtocol($trans, $this->strictRead, $this->strictWrite); 
    405   } 
    406 } 
    407  
    408 /** 
    409  * Accelerated binary protocol: used in conjunction with the thrift_protocol 
    410  * extension for faster deserialization 
    411  */ 
    412 class TBinaryProtocolAccelerated extends TBinaryProtocol { 
    413   public function __construct($trans, $strictRead=false, $strictWrite=true) { 
    414     // If the transport doesn't implement putBack, wrap it in a 
    415     // TBufferedTransport (which does) 
    416     if (!method_exists($trans, 'putBack')) { 
    417       $trans = new TBufferedTransport($trans); 
    418     } 
    419     parent::__construct($trans, $strictRead, $strictWrite); 
    420   } 
    421   public function isStrictRead() { 
    422     return $this->strictRead_; 
    423   } 
    424   public function isStrictWrite() { 
    425     return $this->strictWrite_; 
    426   } 
    427 } 
  • plugins/sfThriftPlugin/trunk/lib/protocol/TProtocol.php

    r31143 r31262  
    3030 
    3131/** 
    32  * Protocol exceptions 
    33  */ 
    34 class TProtocolException extends TException { 
    35   const UNKNOWN = 0; 
    36   const INVALID_DATA = 1; 
    37   const NEGATIVE_SIZE = 2; 
    38   const SIZE_LIMIT = 3; 
    39   const BAD_VERSION = 4; 
    40  
    41   function __construct($message=null, $code=0) { 
    42     parent::__construct($message, $code); 
    43   } 
    44 } 
    45  
    46 /** 
    4732 * Protocol base class module. 
    4833 */ 
     
    361346  } 
    362347} 
    363  
    364 /** 
    365  * Protocol factory creates protocol objects from transports 
    366  */ 
    367 interface TProtocolFactory { 
    368   /** 
    369    * Build a protocol from the base transport 
    370    * 
    371    * @return TProtocol protocol 
    372    */ 
    373   public function getProtocol($trans); 
    374 } 
  • plugins/sfThriftPlugin/trunk/lib/transport/TTransport.php

    r31143 r31262  
    2121 */ 
    2222 
    23  
    24 /** 
    25  * Transport exceptions 
    26  */ 
    27 class TTransportException extends TException { 
    28  
    29   const UNKNOWN = 0; 
    30   const NOT_OPEN = 1; 
    31   const ALREADY_OPEN = 2; 
    32   const TIMED_OUT = 3; 
    33   const END_OF_FILE = 4; 
    34  
    35   function __construct($message=null, $code=0) { 
    36     parent::__construct($message, $code); 
    37   } 
    38 } 
    3923 
    4024/**