src/wcmf/lib/model/impl/AbstractNodeSerializer.php
protected function deserializeValue(Node $node, $key, $value) {
    if (!is_array($value)) {
      // force set value to avoid exceptions in this stage
      $node->setValue($key, $value, true);
    }
    else {
      $role = $key;
      if ($this->isMultiValued($node, $role)) {
        // deserialize children
        foreach($value as $childData) {
          $this->deserializeNode($childData, $node, $role);
        }
      }
      else {
        $this->deserializeNode($value, $node, $role);
      }
    }
  }
protected function deserializeValue(Node $node, $key, $value) {
    if (!is_array($value)) {
      // force set value to avoid exceptions in this stage
      $node->setValue($key, $value, true);
    }
    else {
      $role = $key;
      if ($this->isMultiValued($node, $role)) {
        // deserialize children
        foreach($value as $childData) {
          $this->deserializeNode($childData, $node, $role);
        }
      }
      else {
        $this->deserializeNode($value, $node, $role);
      }
    }
  }
protected function deserializeValue ( Node $ node , $ key , $ value ) { if ( ! is_array ( $ value ) ) { // force set value to avoid exceptions in this stage $ node -> setValue ( $ key , $ value , true ) ; } else { $ role = $ key ; if ( $ this -> isMultiValued ( $ node , $ role ) ) { // deserialize children foreach ( $ value as $ childData ) { $ this -> deserializeNode ( $ childData , $ node , $ role ) ; } } else { $ this -> deserializeNode ( $ value , $ node , $ role ) ; } } }
Deserialize a node value
@param $node Node instance
@param $key The value name or type if value is an array
@param $value The value or child data, if value is an array
Deserialize a node value