public function mergeTrees($dataTree, $tree)
    {
        foreach ($tree as $key => $node) {
            if (is_numeric($key)) {
                $key = uniqid();
            }

            if ( ! isset( $dataTree[$key] )) {
                $dataTree[$key] = $node;
            }

            foreach ($node->getSubNodeNames() as $subNode) {
                if ( ! isset( $dataTree[$key]->$subNode )) {
                    $dataTree[$key]->$subNode = $node->$subNode;
                }

                if ( ! is_array($dataTree[$key]->$subNode)
                     && ! is_array($node->$subNode)
                ) {
                    continue;
                }

                $dataTree[$key]->$subNode = array_merge(
                    (array) $dataTree[$key]->$subNode,
                    (array) $node->$subNode
                );
            }
        }

        return $dataTree;
    }