Changeset 6944

Show
Ignore:
Timestamp:
08/29/07 18:55:25 (1 year ago)
Author:
nicobn
Message:

Registry documentation

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • doc/jaws2/en/books/internals/coress/sections/registry.xml

    r6923 r6944  
    77<sect1> 
    88 <title>Registry subsystem</title> 
     9  
     10 <partintro> 
     11  <formalpara> 
     12   &reftitle.subsystem.synopsis; 
     13    
     14   <informaltable> 
     15    <tgroup cols="2"> 
     16     <row> 
     17      <entry><emphasis>File</emphasis></entry> 
     18      <entry><filename>api/Jaws/Registry.php</filename></entry> 
     19     </row> 
     20 
     21     <row> 
     22      <entry><emphasis>Classes</emphasis></entry> 
     23      <entry> 
     24       <classname>Jaws_Registry</classname> and <classname>Jaws_Registry_Key</classname> 
     25      </entry> 
     26     </row> 
     27 
     28     <row> 
     29      <entry><emphasis>Object</emphasis></entry> 
     30      <entry><varname>Jaws::$Registry</varname></entry> 
     31     </row> 
     32    </tgroup> 
     33   </informaltable> 
     34 
     35  </formalpara> 
     36  <formalpara> 
     37   &reftitle.intro; 
     38   The Jaws registry is used to store various dynamic configuration options.  
     39   It can be rightfully compared to the Windows registry as it is comprised 
     40   of a series of keys with values. This is done to store user preferences 
     41   in a central location so they can be easily accessed and modified.  
     42  </formalpara> 
     43 </partintro> 
     44 
     45 <sect2> 
     46  &reftitle.classes; 
     47  <para> 
     48   The Registry subsystem is made of two classes. 
     49  </para> 
     50 
     51  <formalpara> 
     52   <title><classname>Jaws_Registry</classname></title> 
     53   The <classname>Jaws_Registry</classname> class is the singleton object that 
     54   is instanciated during initialization. It can be accessed with the  
     55   <varname>Jaws::$Registry</varname> variable. 
     56  </formalpara> 
     57 
     58  <formalpara> 
     59   <title><classname>Jaws_Registry_Key</classname></title> 
     60   The <classname>Jaws_Registry_Key</classname> class extends the  
     61   <classname>Doctrine_Record</classname> class. When a key is loaded from the  
     62   database, an object of this class is created and the key can be accessed 
     63   with it. 
     64  </formalpara> 
     65 </sect2> 
     66  
     67  
     68 <sect2> 
     69  &reftitle.internals;  
     70  <para> 
     71   Internally, the Jaws registry uses the Doctrine nested sets feature. The  
     72   registry can be represented as a forest with each root key being a tree. 
     73   All the leaves key have a parent that is a folder (a special type of key). 
     74  </para>  
     75  <para> 
     76   <note> 
     77    It is costly to inject data in a nested set but extremely fast to read it. 
     78   </note> 
     79  </para> 
     80 </sect2>  
     81  
     82 <sect2> 
     83  <title>Working with the registry</title> 
     84   
     85  &internals.coress.sections.registry.rootkeys; 
     86  &internals.coress.sections.registry.normalkeys; 
     87 
     88  <sect3> 
     89   <title>Unified registry interface</title> 
     90  </sect3>  
     91 </sect2> 
    992</sect1>