|
|
(Next) DB_NestedSet::pickNode |
||||
| |
|||||
|
|||||
int
DB_NestedSet::moveTree
(
int
$id
,
$targetid
,
constant
$pos
,
bool
$copy
= = false
,
int
$target
)
This package is not documented yet.
移動元の ID。
移動先の ID。
位置 (定数 NESE_MOVE_* を使用します)。
コピーを作成するかどうか。
ターゲット ID。
移動したノードの ID、あるいはエラー時に false を返します。
_moveInsideLevel
_moveRoot2Root
および _moveAcross も参照ください。
例外はスローされません。
This function can not be called statically.
サブブランチの取得
<?php
require_once('DB/NestedSet.php');
$nestedSet =& DB_NestedSet::factory('DB', $dsn, $params);
$parent = $nestedSet->createRootNode(array('name' => 'root-node'), false, true);
$parent2 = $nestedSet->createSubNode($parent, array('name' => 'sub-node));
$parent3 = $nestedSet->createSubNode($parent2, array('name' => 'sub-node));
$nestedSet->createSubNode($parent3, array('name' => 'sub1'));
$node = $nestedSet->createSubNode($parent3, array('name' => 'sub2'));
$nestedSet->moveTree($node, $parent, NESE_MOVE_AFTER);
?>
|
|
(Next) DB_NestedSet::pickNode |
||||||||
| |
|||||||||
|
|||||||||