| | 346 | |
|---|
| | 347 | <para> |
|---|
| | 348 | Moving a subkey in the tree is not trivial and is certainly not a daily |
|---|
| | 349 | operation. It is accomplished at the key object with the |
|---|
| | 350 | <methodname>Jaws_Registry_Key::moveKey</methodname> method. |
|---|
| | 351 | </para> |
|---|
| | 352 | |
|---|
| | 353 | <sect5> |
|---|
| | 354 | &reftitle.prototype; |
|---|
| | 355 | <para> |
|---|
| | 356 | <methodsynopsis> |
|---|
| | 357 | <type>void</type>><methodname>Jaws::moveKey</methodname> |
|---|
| | 358 | <methodparam> |
|---|
| | 359 | <type>Jaws_Registry_Key</type><parameter>$newparent</parameter> |
|---|
| | 360 | </methodparam> |
|---|
| | 361 | </methodsynopsis> |
|---|
| | 362 | </para> |
|---|
| | 363 | </sect5> |
|---|
| | 364 | |
|---|
| | 365 | <para> |
|---|
| | 366 | <variablelist> |
|---|
| | 367 | <varlistentry> |
|---|
| | 368 | <term><parameter>$newparent</parameter></term> |
|---|
| | 369 | <listitem> |
|---|
| | 370 | The key's new parent. This parameter can be &null;, in which case the key |
|---|
| | 371 | will become a root key. |
|---|
| | 372 | </listitem> |
|---|
| | 373 | </varlistentry> |
|---|
| | 374 | </variablelist> |
|---|
| | 375 | </para> |
|---|
| | 376 | |
|---|
| | 377 | <para> |
|---|
| | 378 | Here is an example of usage. |
|---|
| | 379 | <example> |
|---|
| | 380 | <programlisting role="php"> |
|---|
| | 381 | <![CDATA[ |
|---|
| | 382 | $key = Jaws::$Registry->getRootKey('jaws')->getKey('foo'); |
|---|
| | 383 | $newparent = Jaws::$Registry->getRootKey('bar'); |
|---|
| | 384 | $key->moveKey($newparent); |
|---|
| | 385 | ]]> |
|---|
| | 386 | </programlisting> |
|---|
| | 387 | </example> |
|---|
| | 388 | </para> |
|---|
| | 389 | |
|---|
| | 390 | <para> |
|---|
| | 391 | This example moves key <literal>\jaws\foo</literal> to |
|---|
| | 392 | <literal>\bar\foo</literal>. |
|---|
| | 393 | </para> |
|---|
| | 395 | |
|---|
| | 396 | <sect4> |
|---|
| | 397 | <title>Additional methods</title> |
|---|
| | 398 | <para> |
|---|
| | 399 | In this section are listed some additional methods that help you working with |
|---|
| | 400 | registry keys. |
|---|
| | 401 | </para> |
|---|
| | 402 | |
|---|
| | 403 | <sect5> |
|---|
| | 404 | <title><methodname>Jaws_Registry_Key::isRootKey</methodname></title> |
|---|
| | 405 | <para> |
|---|
| | 406 | This method with return &true; if the key is a root key, &false; otherwise. |
|---|
| | 407 | </para> |
|---|
| | 408 | </sect5> |
|---|
| | 409 | |
|---|
| | 410 | <sect5> |
|---|
| | 411 | <title><methodname>Jaws_Registry_Key::isFolder</methodname></title> |
|---|
| | 412 | <para> |
|---|
| | 413 | This method with return &true; if the key is a folder, &false; otherwise. |
|---|
| | 414 | </para> |
|---|
| | 415 | </sect5> |
|---|
| | 416 | |
|---|
| | 417 | <sect5> |
|---|
| | 418 | <title><methodname>Jaws_Registry_Key::getParent</methodname></title> |
|---|
| | 419 | <para> |
|---|
| | 420 | This method with return the parent's <classname>Jaws_Registry_Key</classname> |
|---|
| | 421 | object or &false; if the key does not have a parent. |
|---|
| | 422 | </para> |
|---|
| | 423 | </sect5> |
|---|
| | 424 | |
|---|
| | 425 | <sect5> |
|---|
| | 426 | <title><methodname>Jaws_Registry_Key::getSubkeys</methodname></title> |
|---|
| | 427 | <para> |
|---|
| | 428 | This method returns an array containing all the subkeys, indexed with their |
|---|
| | 429 | names. |
|---|
| | 430 | </para> |
|---|
| | 431 | </sect5> |
|---|
| | 432 | </sect4> |
|---|