public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'key', 'type' => TType::STRING), 2 => array('var' => 'columns', 'type' => TType::LST, 'etype' => TType::STRUCT, 'elem' => array('type' => TType::STRUCT, 'class' => 'cassandra_ColumnOrSuperColumn')));
     }
     if (is_array($vals)) {
         if (isset($vals['key'])) {
             $this->key = $vals['key'];
         }
         if (isset($vals['columns'])) {
             $this->columns = $vals['columns'];
         }
     }
 }
Beispiel #2
0
 public function read($input)
 {
     $xfer = 0;
     $fname = null;
     $ftype = 0;
     $fid = 0;
     $xfer += $input->readStructBegin($fname);
     while (true) {
         $xfer += $input->readFieldBegin($fname, $ftype, $fid);
         if ($ftype == TType::STOP) {
             break;
         }
         switch ($fid) {
             case 0:
                 if ($ftype == TType::LST) {
                     $this->success = array();
                     $_size74 = 0;
                     $_etype77 = 0;
                     $xfer += $input->readListBegin($_etype77, $_size74);
                     for ($_i78 = 0; $_i78 < $_size74; ++$_i78) {
                         $elem79 = null;
                         $elem79 = new cassandra_KeySlice();
                         $xfer += $elem79->read($input);
                         $this->success[] = $elem79;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 1:
                 if ($ftype == TType::STRUCT) {
                     $this->ire = new cassandra_InvalidRequestException();
                     $xfer += $this->ire->read($input);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 2:
                 if ($ftype == TType::STRUCT) {
                     $this->ue = new cassandra_UnavailableException();
                     $xfer += $this->ue->read($input);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 3:
                 if ($ftype == TType::STRUCT) {
                     $this->te = new cassandra_TimedOutException();
                     $xfer += $this->te->read($input);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             default:
                 $xfer += $input->skip($ftype);
                 break;
         }
         $xfer += $input->readFieldEnd();
     }
     $xfer += $input->readStructEnd();
     return $xfer;
 }