bool
DB_NestedSet::convertTreeModel
(
&$orig
,
&$copy
,
integer
$_parent
= = false
,
object
$
)
これは、1.3 の新機能を使用するためにツリーの形式を変換します。 以前のバージョンで作成したツリーは変換をしなくても動作しますが、 先行順のソートなどの新機能がうまく動きません。
使用法:
- 新たなノードテーブル (tb_nodes2) を現在のノードテーブル (tb_nodes1) から作成します (構造をコピーするだけ)。
- '旧' セットのインスタンス (NeSe1) および新セットのインスタンス (NeSe2) を作成します。
- これで、node_table だけが異なる同一のオブジェクトがふたつ出来上がりました。
- DB_NestedSet::convertTreeModel(&$orig, &$copy); をコールします。
- tb_nodes2 の中にある tb_nodes1 のコピーを消します。
&$orig
&$copy
$_parent
親ノードの ID (private)。
$copy
新しいツリーをコピーするオブジェクト。
成功した場合に True を返します。
例外はスローされません。
This function can not be called statically.