Exemplo n.º 1
0
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'name', 'type' => TType::STRING), 2 => array('var' => 'type1', 'type' => TType::STRING), 3 => array('var' => 'type2', 'type' => TType::STRING));
     }
     if (is_array($vals)) {
         if (isset($vals['name'])) {
             $this->name = $vals['name'];
         }
         if (isset($vals['type1'])) {
             $this->type1 = $vals['type1'];
         }
         if (isset($vals['type2'])) {
             $this->type2 = $vals['type2'];
         }
     }
 }
Exemplo n.º 2
0
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'name', 'type' => TType::STRING), 2 => array('var' => 'type1', 'type' => TType::STRING), 3 => array('var' => 'type2', 'type' => TType::STRING), 4 => array('var' => 'fields', 'type' => TType::LST, 'etype' => TType::STRUCT, 'elem' => array('type' => TType::STRUCT, 'class' => '\\metastore\\FieldSchema')));
     }
     if (is_array($vals)) {
         if (isset($vals['name'])) {
             $this->name = $vals['name'];
         }
         if (isset($vals['type1'])) {
             $this->type1 = $vals['type1'];
         }
         if (isset($vals['type2'])) {
             $this->type2 = $vals['type2'];
         }
         if (isset($vals['fields'])) {
             $this->fields = $vals['fields'];
         }
     }
 }