src/Registry.php
protected function bindData(&$parent, $data)
  {
    if ( is_object($data) ){
      $data = get_object_vars($data);
    }
    else {
      $data = (array) $data;
    }
    
    foreach($data as $k => $v){
      if ( (is_array($v) && ArrayHelper::isAssociative($v)) || is_object($v) ){
        $parent->$k = new \stdClass;
        $this->bindData($parent->$k, $v);
      }
      else {
        $parent->$k = $v;
      }
    }
  }
protected function bindData(&$parent, $data)
  {
    if ( is_object($data) ){
      $data = get_object_vars($data);
    }
    else {
      $data = (array) $data;
    }
    
    foreach($data as $k => $v){
      if ( (is_array($v) && ArrayHelper::isAssociative($v)) || is_object($v) ){
        $parent->$k = new \stdClass;
        $this->bindData($parent->$k, $v);
      }
      else {
        $parent->$k = $v;
      }
    }
  }
protected function bindData ( & $ parent , $ data ) { if ( is_object ( $ data ) ) { $ data = get_object_vars ( $ data ) ; } else { $ data = ( array ) $ data ; } foreach ( $ data as $ k => $ v ) { if ( ( is_array ( $ v ) && ArrayHelper :: isAssociative ( $ v ) ) || is_object ( $ v ) ) { $ parent -> $ k = new \ stdClass ; $ this -> bindData ( $ parent -> $ k , $ v ) ; } else { $ parent -> $ k = $ v ; } } }
Recursively bind data to a parent object

@param   object  &$parent  The parent object on which to attach the data values
@param   mixed   $data     An array or object of data to bind to the parent object
@return   void
Recursively bind data to a parent object