Example #1
0
File: Types.php Project: Leolh/hive
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'nodeType', 'type' => TType::I32), 2 => array('var' => 'roots', 'type' => TType::LST, 'etype' => TType::STRING, 'elem' => array('type' => TType::STRING)), 3 => array('var' => 'adjacencyList', 'type' => TType::LST, 'etype' => TType::STRUCT, 'elem' => array('type' => TType::STRUCT, 'class' => '\\Adjacency')));
     }
     if (is_array($vals)) {
         if (isset($vals['nodeType'])) {
             $this->nodeType = $vals['nodeType'];
         }
         if (isset($vals['roots'])) {
             $this->roots = $vals['roots'];
         }
         if (isset($vals['adjacencyList'])) {
             $this->adjacencyList = $vals['adjacencyList'];
         }
     }
 }