| | 10 | <para> |
|---|
| | 11 | The unified registry interface was designed to give an unique access point for |
|---|
| | 12 | key by key operation. This is useful if you want to get a precise key or wish |
|---|
| | 13 | to work with registry paths. The unified registry interface offers some |
|---|
| | 14 | basic operations that will be explained in this section. |
|---|
| | 15 | </para> |
|---|
| | 16 | |
|---|
| | 17 | <para> |
|---|
| | 18 | All the methods of the interface are accessible through the |
|---|
| | 19 | <varname>Jaws::$Registry</varname> object. |
|---|
| | 20 | </para> |
|---|
| | 21 | |
|---|
| | 22 | <sect4> |
|---|
| | 23 | <title>Create a key</title> |
|---|
| | 24 | <para> |
|---|
| | 25 | It is fairly easy to create a key with the unified interface. All you need to |
|---|
| | 26 | provide is the registry path and the key type. |
|---|
| | 27 | </para> |
|---|
| | 28 | |
|---|
| | 29 | <sect5> |
|---|
| | 30 | &reftitle.prototype; |
|---|
| | 31 | <para> |
|---|
| | 32 | <methodsynopsis> |
|---|
| | 33 | <type>Jaws_Registry_Key</type>><methodname>Jaws_Registry::createKey</methodname> |
|---|
| | 34 | <methodparam><type>string</type><parameter>$regpath</parameter> |
|---|
| | 35 | <methodparam><type>int</type><parameter>$type</parameter> |
|---|
| | 36 | </methodparam> |
|---|
| | 37 | </methodsynopsis> |
|---|
| | 38 | </para> |
|---|
| | 39 | </sect5> |
|---|
| | 40 | |
|---|
| | 41 | <para> |
|---|
| | 42 | <variablelist> |
|---|
| | 43 | <varlistentry> |
|---|
| | 44 | <term><parameter>$regpath</parameter></term> |
|---|
| | 45 | <listitem> |
|---|
| | 46 | The registry path of the new key. |
|---|
| | 47 | </listitem> |
|---|
| | 48 | </varlistentry> |
|---|
| | 49 | </variablelist> |
|---|
| | 50 | </para> |
|---|
| | 51 | |
|---|
| | 52 | <para> |
|---|
| | 53 | Here is an example of usage. |
|---|
| | 54 | <example> |
|---|
| | 55 | <programlisting role="php"> |
|---|
| | 56 | <![CDATA[ |
|---|
| | 57 | $root = Jaws::$Registry->createKey('\jaws', TYPE_FOLDER); |
|---|
| | 58 | $key = Jaws::$Registry->createKey('\jaws\foo', TYPE_INT); |
|---|
| | 59 | |
|---|
| | 60 | echo $key->getParent()->getName(); |
|---|
| | 61 | ]]> |
|---|
| | 62 | </programlisting> |
|---|
| | 63 | </example> |
|---|
| | 64 | </para> |
|---|
| | 65 | |
|---|
| | 66 | <para> |
|---|
| | 67 | This example creates the <literal>\jaws</literal> root key and the integer |
|---|
| | 68 | <literal>\jaws\foo</literal> key and prints its parent, which will be |
|---|
| | 69 | <literal>jaws</literal>. |
|---|
| | 70 | </para> |
|---|
| | 71 | </sect4> |
|---|
| | 72 | |
|---|
| | 73 | <sect4> |
|---|
| | 74 | <title>Move a key</title> |
|---|
| | 75 | </sect4> |
|---|
| | 76 | |
|---|
| | 77 | <sect4> |
|---|
| | 78 | <title>Delete a key</title> |
|---|
| | 79 | </sect4> |
|---|
| | 80 | |
|---|
| | 81 | <sect4> |
|---|
| | 82 | <title>Access a key</title> |
|---|
| | 83 | </sect4> |
|---|