break; } echo $res->id . "\n"; break; case 'isParent': if (!$collection) { echo "Error: no collection in use.\n"; break; } elseif (!$input[1]) { echo "Error: no parent ID specified.\n"; break; } elseif (!$input[2]) { echo "Error: no node ID specified.\n"; break; } if (!$ns->isParent($input[1], $input[2])) { echo "no\n"; break; } echo "yes\n"; break; case 'path': if (!$collection) { echo "Error: no collection in use.\n"; break; } elseif (!$input[1]) { echo "Error: no node ID specified.\n"; break; } $path = $ns->path($input[1]); if (!$path) {