コード例 #1
0
ファイル: FacebookService.php プロジェクト: WickyLeo/bobcat
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(0 => array('var' => 'success', 'type' => TType::STRING));
     }
     if (is_array($vals)) {
         if (isset($vals['success'])) {
             $this->success = $vals['success'];
         }
     }
 }
コード例 #2
0
 public function recv_getVersion()
 {
     $bin_accel = $this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED && function_exists('thrift_protocol_read_binary');
     if ($bin_accel) {
         $result = thrift_protocol_read_binary($this->input_, 'FacebookService_getVersion_result', $this->input_->isStrictRead());
     } else {
         $rseqid = 0;
         $fname = null;
         $mtype = 0;
         $this->input_->readMessageBegin($fname, $mtype, $rseqid);
         if ($mtype == TMessageType::EXCEPTION) {
             $x = new TApplicationException();
             $x->read($this->input_);
             $this->input_->readMessageEnd();
             throw $x;
         }
         $result = new FacebookService_getVersion_result();
         $result->read($this->input_);
         $this->input_->readMessageEnd();
     }
     if ($result->success !== null) {
         return $result->success;
     }
     throw new Exception("getVersion failed: unknown result");
 }
コード例 #3
0
ファイル: FacebookService.php プロジェクト: Tjorriemorrie/app
 protected function process_getVersion($seqid, $input, $output)
 {
     $args = new FacebookService_getVersion_args();
     $args->read($input);
     $input->readMessageEnd();
     $result = new FacebookService_getVersion_result();
     $result->success = $this->handler_->getVersion();
     $output->writeMessageBegin('getVersion', TMessageType::REPLY, $seqid);
     $result->write($output);
     $output->getTransport()->flush();
 }