Exemple #1
0
 /**
  * Build hierarchical Data containers from the associated Join structure.
  *
  * @param JoinIface $joinStructure Structure to build the data from.
  * @return Data
  */
 public function build(JoinIface $joinStructure)
 {
     $jointData = [];
     $joins = $joinStructure->getJoins();
     if (isset($joins)) {
         foreach ($joins as $joinID => $join) {
             $jointData[$joinID] = $this->build($join);
         }
     }
     return new Data($joinStructure, $jointData);
 }
Exemple #2
0
 /**
  * Set the data that we are managing.
  *
  * @param mixed[] $data The data we want to manage.
  */
 public function setData(array $data)
 {
     $this->data = $this->joinStructure->arrangeFlatData($data);
     $this->rewind();
 }