src/wcmf/lib/model/impl/AbstractNodeSerializer.php
protected function getNodeTemplate($oid) {
    // load object if existing to get the original data
    $originalNode = $this->persistenceFacade->load($oid, BuildDepth::SINGLE);

    // create the request node and copy the orignal data
    $class = get_class($this->persistenceFacade->create($oid->getType(), BuildDepth::SINGLE));
    $node = new $class;
    if ($originalNode) {
      $originalNode->copyValues($node);
    }
    return $node;
  }
protected function getNodeTemplate($oid) {
    // load object if existing to get the original data
    $originalNode = $this->persistenceFacade->load($oid, BuildDepth::SINGLE);

    // create the request node and copy the orignal data
    $class = get_class($this->persistenceFacade->create($oid->getType(), BuildDepth::SINGLE));
    $node = new $class;
    if ($originalNode) {
      $originalNode->copyValues($node);
    }
    return $node;
  }
protected function getNodeTemplate ( $ oid ) { // load object if existing to get the original data $ originalNode = $ this -> persistenceFacade -> load ( $ oid , BuildDepth :: SINGLE ) ; // create the request node and copy the orignal data $ class = get_class ( $ this -> persistenceFacade -> create ( $ oid -> getType ( ) , BuildDepth :: SINGLE ) ) ; $ node = new $ class ; if ( $ originalNode ) { $ originalNode -> copyValues ( $ node ) ; } return $ node ; }
Get a Node instance based on the original values to merge the deserialized values into
@param $oid The object id of the Node
@return Node
Get a Node instance based on the original values to merge the deserialized values into