You are viewing a plain text version of this content. The canonical link for it is here.
Posted to zeta-commits@incubator.apache.org by je...@apache.org on 2011/07/10 17:31:24 UTC

[zeta-commits] svn commit: r1144915 [30/37] - in /incubator/zetacomponents: trunk/Authentication/docs/ trunk/AuthenticationDatabaseTiein/docs/ trunk/Base/docs/ trunk/Configuration/docs/ trunk/Document/docs/ trunk/EventLog/docs/ trunk/Feed/docs/ trunk/File/docs/ trunk...

Modified: incubator/zetacomponents/website/htdocs/documentation/trunk/Translation.html
URL: http://svn.apache.org/viewvc/incubator/zetacomponents/website/htdocs/documentation/trunk/Translation.html?rev=1144915&r1=1144914&r2=1144915&view=diff
==============================================================================
--- incubator/zetacomponents/website/htdocs/documentation/trunk/Translation.html (original)
+++ incubator/zetacomponents/website/htdocs/documentation/trunk/Translation.html Sun Jul 10 17:30:59 2011
@@ -10,15 +10,15 @@
 
 	<meta name="description" content="Apache Zeta Components - reusable set of high quality PHP components to fasten your development." />
 	<meta name="keywords" content="PHP, apache, components, framework, quality" />
-	<meta name="author" content="dotxp" />
+	<meta name="author" content="jerome" />
 	<meta name="language" content="en" />
-	<meta name="date" content="Wed, 04 Aug 2010 13:07:09 +0200" />
+	<meta name="date" content="Sun, 10 Jul 2011 11:10:41 +0200" />
 	<meta name="robots" content="all" />
 
 	<link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" />
 	<meta name="DC.title" content="Translation" />
-	<meta name="DC.creator" content="dotxp" />
-	<meta name="DC.date" content="Wed, 04 Aug 2010 13:07:09 +0200" />
+	<meta name="DC.creator" content="jerome" />
+	<meta name="DC.date" content="Sun, 10 Jul 2011 11:10:41 +0200" />
 	<meta name="DC.rights" content="Copyright" />
 
 	<link rel="meta" href="/zetacomponents/documentation/trunk/Translation/tutorial.rdf" />
@@ -80,7 +80,7 @@
 
 </ul>
 
-		<h2>eZ Components - Translation</h2><div class="toc"><h3>Table of Contents</h3><ul><li><p><a href="#introduction">Introduction</a></p></li><li><p><a href="#dependencies">Dependencies</a></p></li><li><p><a href="#class-overview">Class overview</a></p></li><li><p><a href="#basic-usage">Basic usage</a></p></li><li><p><a href="#parameterized-strings">Parameterized strings</a></p></li><li><p><a href="#filters">Filters</a></p></li><li><p><a href="#iteration">Iteration</a></p></li><li><p><a href="#caching">Caching</a></p></li><li><p><a href="#manipulating-translation-files">Manipulating translation files</a></p></li><li><p><a href="#more-information">More information</a></p></li></ul></div><a name="introduction"></a><a name="id1"></a><h3>Introduction</h3><p>Many web applications require the use of translated GUI elements. There are several traditional ways of providing this functionality, but none of them are particularly easy to use or maintain. The Translation component provide
 s functionality for retrieving translated data through multiple (extendable) backends and for filtering translatable data. It also allows translated strings with parameters; as a result, it is possible to use different word orders in different languages while still utilizing the parameters correctly.</p><a name="dependencies"></a><a name="id2"></a><h3>Dependencies</h3><p>This component has an optional dependency on the Cache component by means of the TranslationCacheTiein component. When the latter is installed, the Translation system can make use of a cache for the storage and retrieval of data.</p><p>The Template component also has an optional dependency on this component, by means of the TemplateTranslationTiein component. This component adds a template function that uses the Translation component to fetch translated data.</p><a name="class-overview"></a><a name="id3"></a><h3>Class overview</h3><dl><dt>ezcTranslationManager</dt><dd>This is the main class of this component
 . It is responsible for calling the configured backends to read translation data and return a translation context in the form of an <a href='/zetacomponents/documentation/trunk/Translation/phpdoc/ezcTranslation.html'>ezcTranslation</a> object.</dd><dt>ezcTranslationCacheBackend, <a href='/zetacomponents/documentation/trunk/Translation/phpdoc/ezcTranslationTsBackend.html'>ezcTranslationTsBackend</a></dt><dd>These classes implement backends that read data from a specific source. <a href='/zetacomponents/documentation/trunk/Translation/phpdoc/ezcTranslationTsBackend.html'>ezcTranslationTsBackend</a> reads its data from <a href="http://www.trolltech.com/products/qt/features/internationalization">Qt's Linguist files</a> - an XML-based format for storing original text and translated text. The <a href='/zetacomponents/documentation/trunk/Translation/phpdoc/ezcTranslationCacheBackend.html'>ezcTranslationCacheBackend</a> handler reads translation data through the Cache mechanism.</dd
 ><dt>ezcTranslation</dt><dd>Objects of this class are returned by the <a href='/zetacomponents/documentation/trunk/Translation/phpdoc/ezcTranslationManager.html#getContext'>ezcTranslationManager::getContext</a>() method. <a href='/zetacomponents/documentation/trunk/Translation/phpdoc/ezcTranslationManager.html'>ezcTranslationManager</a> uses the backend's getContext() method to retrieve data.</dd><dt>ezcTranslationComplementEmptyFilter</dt><dd>This class implements a filter that substitutes a missing ("unfinished") translated string with its untranslated source. This filter makes sure that all translatable strings return some text, even if a particular string has not been translated yet.</dd><dt>ezcTranslationBorkFilter, <a href='/zetacomponents/documentation/trunk/Translation/phpdoc/ezcTranslationLeetFilter.html'>ezcTranslationLeetFilter</a></dt><dd>These two classes serve as examples on how to implement filters. Aside from serving as examples, they have very little functio
 n.</dd></dl><a name="basic-usage"></a><a name="id4"></a><h3>Basic usage</h3><p>In the simplest case, your application only needs to access translated versions of the strings that it uses. In most cases, the strings used in an application will be in English, but of course that is not always the case. In the first version of this component, we only support <a href="http://www.trolltech.com/products/qt/features/internationalization">Qt's Linguist files</a> (TS files) which group translatable strings together in contexts. The TS file format is handled by the <a href='/zetacomponents/documentation/trunk/Translation/phpdoc/ezcTranslationTsBackend.html'>ezcTranslationTsBackend</a> class. This backend requires one setting (the location to find the translation) and has one option (the format for the filename for each locale).</p><p>In the first example, we assume that all translations are stored in the "translations/" directory, and that the filename consists of "translation-" follow
 ed by the locale name with the suffix ".xml". The locale name itself is a freeform field, but we recommend to use the <a href="http://www.loc.gov/standards/iso639-2/php/code_list.php">ISO639-1</a> language code, followed by a _ (underscore), followed by the <a href="http://www.iso.org/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html">ISO3166</a> country code. For example, use nb_NO.xml for Bokmål/Norway or nl_BE.xml for Dutch/Belgium.</p><ol class="code">
+		<h2>eZ Components - Translation</h2><div class="toc"><h3>Table of Contents</h3><ul><li><p><a href="#introduction">Introduction</a></p></li><li><p><a href="#dependencies">Dependencies</a></p></li><li><p><a href="#class-overview">Class overview</a></p></li><li><p><a href="#basic-usage">Basic usage</a></p></li><li><p><a href="#parameterized-strings">Parameterized strings</a></p></li><li><p><a href="#filters">Filters</a></p></li><li><p><a href="#iteration">Iteration</a></p></li><li><p><a href="#caching">Caching</a></p></li><li><p><a href="#manipulating-translation-files">Manipulating translation files</a></p></li><li><p><a href="#more-information">More information</a></p></li></ul></div><a name="introduction"></a><a name="id1"></a><h3>Introduction</h3><p>Many web applications require the use of translated GUI elements. There are several traditional ways of providing this functionality, but none of them are particularly easy to use or maintain. The Translation component provide
 s functionality for retrieving translated data through multiple (extendable) backends and for filtering translatable data. It also allows translated strings with parameters; as a result, it is possible to use different word orders in different languages while still utilizing the parameters correctly.</p><a name="dependencies"></a><a name="id2"></a><h3>Dependencies</h3><p>This component has an optional dependency on the Cache component by means of the TranslationCacheTiein component. When the latter is installed, the Translation system can make use of a cache for the storage and retrieval of data.</p><p>The Template component also has an optional dependency on this component, by means of the TemplateTranslationTiein component. This component adds a template function that uses the Translation component to fetch translated data.</p><a name="class-overview"></a><a name="id3"></a><h3>Class overview</h3><dl><dt>ezcTranslationManager</dt><dd>This is the main class of this component
 . It is responsible for calling the configured backends to read translation data and return a translation context in the form of an <a href='/zetacomponents/documentation/trunk/Translation/phpdoc/ezcTranslation.html'>ezcTranslation</a> object.</dd><dt>ezcTranslationCacheBackend, <a href='/zetacomponents/documentation/trunk/Translation/phpdoc/ezcTranslationTsBackend.html'>ezcTranslationTsBackend</a></dt><dd>These classes implement backends that read data from a specific source. <a href='/zetacomponents/documentation/trunk/Translation/phpdoc/ezcTranslationTsBackend.html'>ezcTranslationTsBackend</a> reads its data from <a href="http://qt.nokia.com/products/qt/features/internationalization">Qt's Linguist files</a> - an XML-based format for storing original text and translated text. The <a href='/zetacomponents/documentation/trunk/Translation/phpdoc/ezcTranslationCacheBackend.html'>ezcTranslationCacheBackend</a> handler reads translation data through the Cache mechanism.</dd><dt>
 ezcTranslation</dt><dd>Objects of this class are returned by the <a href='/zetacomponents/documentation/trunk/Translation/phpdoc/ezcTranslationManager.html#getContext'>ezcTranslationManager::getContext</a>() method. <a href='/zetacomponents/documentation/trunk/Translation/phpdoc/ezcTranslationManager.html'>ezcTranslationManager</a> uses the backend's getContext() method to retrieve data.</dd><dt>ezcTranslationComplementEmptyFilter</dt><dd>This class implements a filter that substitutes a missing ("unfinished") translated string with its untranslated source. This filter makes sure that all translatable strings return some text, even if a particular string has not been translated yet.</dd><dt>ezcTranslationBorkFilter, <a href='/zetacomponents/documentation/trunk/Translation/phpdoc/ezcTranslationLeetFilter.html'>ezcTranslationLeetFilter</a></dt><dd>These two classes serve as examples on how to implement filters. Aside from serving as examples, they have very little function.</d
 d></dl><a name="basic-usage"></a><a name="id4"></a><h3>Basic usage</h3><p>In the simplest case, your application only needs to access translated versions of the strings that it uses. In most cases, the strings used in an application will be in English, but of course that is not always the case. In the first version of this component, we only support <a href="http://qt.nokia.com/products/qt/features/internationalization">Qt's Linguist files</a> (TS files) which group translatable strings together in contexts. The TS file format is handled by the <a href='/zetacomponents/documentation/trunk/Translation/phpdoc/ezcTranslationTsBackend.html'>ezcTranslationTsBackend</a> class. This backend requires one setting (the location to find the translation) and has one option (the format for the filename for each locale).</p><p>In the first example, we assume that all translations are stored in the "translations/" directory, and that the filename consists of "translation-" followed by the 
 locale name with the suffix ".xml". The locale name itself is a freeform field, but we recommend to use the <a href="http://www.loc.gov/standards/iso639-2/php/code_list.php">ISO639-1</a> language code, followed by a _ (underscore), followed by the <a href="http://www.iso.org/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html">ISO3166</a> country code. For example, use nb_NO.xml for Bokmål/Norway or nl_BE.xml for Dutch/Belgium.</p><ol class="code">
 <li><span style="color: #000000">&lt;?php</span></li>
 <li><span style="color: #0000FF">require_once&nbsp;</span><span style="color: #335533">'tutorial_autoload.php'</span><span style="color: #0000FF">;</span></li>
 <li></li>

Modified: incubator/zetacomponents/website/htdocs/documentation/trunk/Translation/tutorial.html
URL: http://svn.apache.org/viewvc/incubator/zetacomponents/website/htdocs/documentation/trunk/Translation/tutorial.html?rev=1144915&r1=1144914&r2=1144915&view=diff
==============================================================================
--- incubator/zetacomponents/website/htdocs/documentation/trunk/Translation/tutorial.html (original)
+++ incubator/zetacomponents/website/htdocs/documentation/trunk/Translation/tutorial.html Sun Jul 10 17:30:59 2011
@@ -10,15 +10,15 @@
 
 	<meta name="description" content="Apache Zeta Components - reusable set of high quality PHP components to fasten your development." />
 	<meta name="keywords" content="PHP, apache, components, framework, quality" />
-	<meta name="author" content="dotxp" />
+	<meta name="author" content="jerome" />
 	<meta name="language" content="en" />
-	<meta name="date" content="Wed, 04 Aug 2010 13:07:09 +0200" />
+	<meta name="date" content="Sun, 10 Jul 2011 11:10:41 +0200" />
 	<meta name="robots" content="all" />
 
 	<link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" />
 	<meta name="DC.title" content="Tutorial" />
-	<meta name="DC.creator" content="dotxp" />
-	<meta name="DC.date" content="Wed, 04 Aug 2010 13:07:09 +0200" />
+	<meta name="DC.creator" content="jerome" />
+	<meta name="DC.date" content="Sun, 10 Jul 2011 11:10:41 +0200" />
 	<meta name="DC.rights" content="Copyright" />
 
 	<link rel="meta" href="/zetacomponents/documentation/trunk/Translation/tutorial.rdf" />
@@ -80,7 +80,7 @@
 
 </ul>
 
-		<h2>eZ Components - Translation</h2><div class="toc"><h3>Table of Contents</h3><ul><li><p><a href="#introduction">Introduction</a></p></li><li><p><a href="#dependencies">Dependencies</a></p></li><li><p><a href="#class-overview">Class overview</a></p></li><li><p><a href="#basic-usage">Basic usage</a></p></li><li><p><a href="#parameterized-strings">Parameterized strings</a></p></li><li><p><a href="#filters">Filters</a></p></li><li><p><a href="#iteration">Iteration</a></p></li><li><p><a href="#caching">Caching</a></p></li><li><p><a href="#manipulating-translation-files">Manipulating translation files</a></p></li><li><p><a href="#more-information">More information</a></p></li></ul></div><a name="introduction"></a><a name="id1"></a><h3>Introduction</h3><p>Many web applications require the use of translated GUI elements. There are several traditional ways of providing this functionality, but none of them are particularly easy to use or maintain. The Translation component provide
 s functionality for retrieving translated data through multiple (extendable) backends and for filtering translatable data. It also allows translated strings with parameters; as a result, it is possible to use different word orders in different languages while still utilizing the parameters correctly.</p><a name="dependencies"></a><a name="id2"></a><h3>Dependencies</h3><p>This component has an optional dependency on the Cache component by means of the TranslationCacheTiein component. When the latter is installed, the Translation system can make use of a cache for the storage and retrieval of data.</p><p>The Template component also has an optional dependency on this component, by means of the TemplateTranslationTiein component. This component adds a template function that uses the Translation component to fetch translated data.</p><a name="class-overview"></a><a name="id3"></a><h3>Class overview</h3><dl><dt>ezcTranslationManager</dt><dd>This is the main class of this component
 . It is responsible for calling the configured backends to read translation data and return a translation context in the form of an <a href='/zetacomponents/documentation/trunk/Translation/phpdoc/ezcTranslation.html'>ezcTranslation</a> object.</dd><dt>ezcTranslationCacheBackend, <a href='/zetacomponents/documentation/trunk/Translation/phpdoc/ezcTranslationTsBackend.html'>ezcTranslationTsBackend</a></dt><dd>These classes implement backends that read data from a specific source. <a href='/zetacomponents/documentation/trunk/Translation/phpdoc/ezcTranslationTsBackend.html'>ezcTranslationTsBackend</a> reads its data from <a href="http://www.trolltech.com/products/qt/features/internationalization">Qt's Linguist files</a> - an XML-based format for storing original text and translated text. The <a href='/zetacomponents/documentation/trunk/Translation/phpdoc/ezcTranslationCacheBackend.html'>ezcTranslationCacheBackend</a> handler reads translation data through the Cache mechanism.</dd
 ><dt>ezcTranslation</dt><dd>Objects of this class are returned by the <a href='/zetacomponents/documentation/trunk/Translation/phpdoc/ezcTranslationManager.html#getContext'>ezcTranslationManager::getContext</a>() method. <a href='/zetacomponents/documentation/trunk/Translation/phpdoc/ezcTranslationManager.html'>ezcTranslationManager</a> uses the backend's getContext() method to retrieve data.</dd><dt>ezcTranslationComplementEmptyFilter</dt><dd>This class implements a filter that substitutes a missing ("unfinished") translated string with its untranslated source. This filter makes sure that all translatable strings return some text, even if a particular string has not been translated yet.</dd><dt>ezcTranslationBorkFilter, <a href='/zetacomponents/documentation/trunk/Translation/phpdoc/ezcTranslationLeetFilter.html'>ezcTranslationLeetFilter</a></dt><dd>These two classes serve as examples on how to implement filters. Aside from serving as examples, they have very little functio
 n.</dd></dl><a name="basic-usage"></a><a name="id4"></a><h3>Basic usage</h3><p>In the simplest case, your application only needs to access translated versions of the strings that it uses. In most cases, the strings used in an application will be in English, but of course that is not always the case. In the first version of this component, we only support <a href="http://www.trolltech.com/products/qt/features/internationalization">Qt's Linguist files</a> (TS files) which group translatable strings together in contexts. The TS file format is handled by the <a href='/zetacomponents/documentation/trunk/Translation/phpdoc/ezcTranslationTsBackend.html'>ezcTranslationTsBackend</a> class. This backend requires one setting (the location to find the translation) and has one option (the format for the filename for each locale).</p><p>In the first example, we assume that all translations are stored in the "translations/" directory, and that the filename consists of "translation-" follow
 ed by the locale name with the suffix ".xml". The locale name itself is a freeform field, but we recommend to use the <a href="http://www.loc.gov/standards/iso639-2/php/code_list.php">ISO639-1</a> language code, followed by a _ (underscore), followed by the <a href="http://www.iso.org/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html">ISO3166</a> country code. For example, use nb_NO.xml for Bokmål/Norway or nl_BE.xml for Dutch/Belgium.</p><ol class="code">
+		<h2>eZ Components - Translation</h2><div class="toc"><h3>Table of Contents</h3><ul><li><p><a href="#introduction">Introduction</a></p></li><li><p><a href="#dependencies">Dependencies</a></p></li><li><p><a href="#class-overview">Class overview</a></p></li><li><p><a href="#basic-usage">Basic usage</a></p></li><li><p><a href="#parameterized-strings">Parameterized strings</a></p></li><li><p><a href="#filters">Filters</a></p></li><li><p><a href="#iteration">Iteration</a></p></li><li><p><a href="#caching">Caching</a></p></li><li><p><a href="#manipulating-translation-files">Manipulating translation files</a></p></li><li><p><a href="#more-information">More information</a></p></li></ul></div><a name="introduction"></a><a name="id1"></a><h3>Introduction</h3><p>Many web applications require the use of translated GUI elements. There are several traditional ways of providing this functionality, but none of them are particularly easy to use or maintain. The Translation component provide
 s functionality for retrieving translated data through multiple (extendable) backends and for filtering translatable data. It also allows translated strings with parameters; as a result, it is possible to use different word orders in different languages while still utilizing the parameters correctly.</p><a name="dependencies"></a><a name="id2"></a><h3>Dependencies</h3><p>This component has an optional dependency on the Cache component by means of the TranslationCacheTiein component. When the latter is installed, the Translation system can make use of a cache for the storage and retrieval of data.</p><p>The Template component also has an optional dependency on this component, by means of the TemplateTranslationTiein component. This component adds a template function that uses the Translation component to fetch translated data.</p><a name="class-overview"></a><a name="id3"></a><h3>Class overview</h3><dl><dt>ezcTranslationManager</dt><dd>This is the main class of this component
 . It is responsible for calling the configured backends to read translation data and return a translation context in the form of an <a href='/zetacomponents/documentation/trunk/Translation/phpdoc/ezcTranslation.html'>ezcTranslation</a> object.</dd><dt>ezcTranslationCacheBackend, <a href='/zetacomponents/documentation/trunk/Translation/phpdoc/ezcTranslationTsBackend.html'>ezcTranslationTsBackend</a></dt><dd>These classes implement backends that read data from a specific source. <a href='/zetacomponents/documentation/trunk/Translation/phpdoc/ezcTranslationTsBackend.html'>ezcTranslationTsBackend</a> reads its data from <a href="http://qt.nokia.com/products/qt/features/internationalization">Qt's Linguist files</a> - an XML-based format for storing original text and translated text. The <a href='/zetacomponents/documentation/trunk/Translation/phpdoc/ezcTranslationCacheBackend.html'>ezcTranslationCacheBackend</a> handler reads translation data through the Cache mechanism.</dd><dt>
 ezcTranslation</dt><dd>Objects of this class are returned by the <a href='/zetacomponents/documentation/trunk/Translation/phpdoc/ezcTranslationManager.html#getContext'>ezcTranslationManager::getContext</a>() method. <a href='/zetacomponents/documentation/trunk/Translation/phpdoc/ezcTranslationManager.html'>ezcTranslationManager</a> uses the backend's getContext() method to retrieve data.</dd><dt>ezcTranslationComplementEmptyFilter</dt><dd>This class implements a filter that substitutes a missing ("unfinished") translated string with its untranslated source. This filter makes sure that all translatable strings return some text, even if a particular string has not been translated yet.</dd><dt>ezcTranslationBorkFilter, <a href='/zetacomponents/documentation/trunk/Translation/phpdoc/ezcTranslationLeetFilter.html'>ezcTranslationLeetFilter</a></dt><dd>These two classes serve as examples on how to implement filters. Aside from serving as examples, they have very little function.</d
 d></dl><a name="basic-usage"></a><a name="id4"></a><h3>Basic usage</h3><p>In the simplest case, your application only needs to access translated versions of the strings that it uses. In most cases, the strings used in an application will be in English, but of course that is not always the case. In the first version of this component, we only support <a href="http://qt.nokia.com/products/qt/features/internationalization">Qt's Linguist files</a> (TS files) which group translatable strings together in contexts. The TS file format is handled by the <a href='/zetacomponents/documentation/trunk/Translation/phpdoc/ezcTranslationTsBackend.html'>ezcTranslationTsBackend</a> class. This backend requires one setting (the location to find the translation) and has one option (the format for the filename for each locale).</p><p>In the first example, we assume that all translations are stored in the "translations/" directory, and that the filename consists of "translation-" followed by the 
 locale name with the suffix ".xml". The locale name itself is a freeform field, but we recommend to use the <a href="http://www.loc.gov/standards/iso639-2/php/code_list.php">ISO639-1</a> language code, followed by a _ (underscore), followed by the <a href="http://www.iso.org/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html">ISO3166</a> country code. For example, use nb_NO.xml for Bokmål/Norway or nl_BE.xml for Dutch/Belgium.</p><ol class="code">
 <li><span style="color: #000000">&lt;?php</span></li>
 <li><span style="color: #0000FF">require_once&nbsp;</span><span style="color: #335533">'tutorial_autoload.php'</span><span style="color: #0000FF">;</span></li>
 <li></li>

Modified: incubator/zetacomponents/website/htdocs/documentation/trunk/Translation/tutorial.txt
URL: http://svn.apache.org/viewvc/incubator/zetacomponents/website/htdocs/documentation/trunk/Translation/tutorial.txt?rev=1144915&r1=1144914&r2=1144915&view=diff
==============================================================================
--- incubator/zetacomponents/website/htdocs/documentation/trunk/Translation/tutorial.txt (original)
+++ incubator/zetacomponents/website/htdocs/documentation/trunk/Translation/tutorial.txt Sun Jul 10 17:30:59 2011
@@ -56,7 +56,7 @@ ezcTranslationBorkFilter, ezcTranslation
   serving as examples, they have very little function.
 
 
-.. _Qt's Linguist files: http://www.trolltech.com/products/qt/features/internationalization
+.. _Qt's Linguist files: http://qt.nokia.com/products/qt/features/internationalization
 
 
 Basic usage
@@ -315,4 +315,4 @@ classes in this component) for more info
    mode: rst
    fill-column: 79
    End:
-   vim: et syn=rst tw=79
+   vim: et syn=rst tw=79
\ No newline at end of file

Modified: incubator/zetacomponents/website/htdocs/documentation/trunk/Tree.html
URL: http://svn.apache.org/viewvc/incubator/zetacomponents/website/htdocs/documentation/trunk/Tree.html?rev=1144915&r1=1144914&r2=1144915&view=diff
==============================================================================
--- incubator/zetacomponents/website/htdocs/documentation/trunk/Tree.html (original)
+++ incubator/zetacomponents/website/htdocs/documentation/trunk/Tree.html Sun Jul 10 17:30:59 2011
@@ -10,15 +10,15 @@
 
 	<meta name="description" content="Apache Zeta Components - reusable set of high quality PHP components to fasten your development." />
 	<meta name="keywords" content="PHP, apache, components, framework, quality" />
-	<meta name="author" content="dotxp" />
+	<meta name="author" content="jerome" />
 	<meta name="language" content="en" />
-	<meta name="date" content="Wed, 04 Aug 2010 13:07:09 +0200" />
+	<meta name="date" content="Sun, 10 Jul 2011 11:10:40 +0200" />
 	<meta name="robots" content="all" />
 
 	<link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" />
 	<meta name="DC.title" content="Tree" />
-	<meta name="DC.creator" content="dotxp" />
-	<meta name="DC.date" content="Wed, 04 Aug 2010 13:07:09 +0200" />
+	<meta name="DC.creator" content="jerome" />
+	<meta name="DC.date" content="Sun, 10 Jul 2011 11:10:40 +0200" />
 	<meta name="DC.rights" content="Copyright" />
 
 	<link rel="meta" href="/zetacomponents/documentation/trunk/Tree/tutorial.rdf" />
@@ -95,7 +95,7 @@
             [1]
         </a>, <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTreePersistentObjectDataStore.html'>ezcTreePersistentObjectDataStore</a> <a class="footnote" href="#id11" name="_footnote_id11">
             [2]
-        </a></p></td></tr></tbody></table><dl class="footnote"><dt><a href="#_footnote_id10" name="id10">1</a></dt><dd>Available through the <a href="introduction_TreeDatabaseTiein.html">TreeDatabaseTiein</a> component</dd></dl><dl class="footnote"><dt><a href="#_footnote_id11" name="id11">2</a></dt><dd>Available through the <a href="introduction_TreePersistentObjectTiein.html">TreePersistentObjectTiein</a> component</dd></dl><a name="dependencies"></a><a name="id13"></a><h3>Dependencies</h3><p>From the table and comments above, it becomes apparent that there are a few optional dependencies. Through the <a href="introduction_TreeDatabaseTiein.html">TreeDatabaseTiein</a> and <a href="introduction_TreePersistentObjectTiein.html">TreePersistentObjectTiein</a> components, additional functionality becomes available.</p><a name="class-overview"></a><a name="id14"></a><h3>Class overview</h3><dl><dt>ezcTreeMemory, <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTreeXml.h
 tml'>ezcTreeXml</a></dt><dd>These two classes are available (without using the Tiein components) to store tree data in memory or in an XML file. There is a matching data store for each of those two classes (<a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTreeMemoryDataStore.html'>ezcTreeMemoryDataStore</a> and <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTreeXmlInternalDataStore.html'>ezcTreeXmlInternalDataStore</a>).</dd><dt>ezcTreeDbMaterializedPath, <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTreeDbNestedSet.html'>ezcTreeDbNestedSet</a>, <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTreeDbParentChild.html'>ezcTreeDbParentChild</a></dt><dd>These three back-ends are made available through the <a href="introduction_TreeDatabaseTiein.html">TreeDatabaseTiein</a> component. Each of them implements a different strategy for storing the relations between nodes. The nature of your application will determine the appropriate ba
 ck-end. For more information, see the <a href="#back-ends">Back-ends</a> section.</dd><dt>ezcTreeNode</dt><dd>This class represents one node of the tree. Objects of this class can be added to the tree. The object stores both the ID and data belonging to the node. Data is always fetched on demand, unless <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTreeNodeListIterator.html'>ezcTreeNodeListIterator</a> is used with the pre-fetch option.</dd><dt>ezcTreeNodeListIterator</dt><dd>This class can be used to iterate over an <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTreeNodeList.html'>ezcTreeNodeList</a>, which is returned by many of the node fetching operations (see the <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTree.html'>ezcTree</a> documentation for which operations are supported). It is advised to use this class to iterate through the nodes and not to simply use foreach() on a returned <a href='/zetacomponents/documentation/trunk
 /Tree/phpdoc/ezcTreeNodeList.html'>ezcTreeNodeList</a>. This is because this class also supports pre-fetching associated data, which can drastically reduce the number of queries being run in case a database-based data store is used (such as <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTreeDbExternalTableDataStore.html'>ezcTreeDbExternalTableDataStore</a> or <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTreePersistentObjectDataStore.html'>ezcTreePersistentObjectDataStore</a>).</dd></dl><a name="basic-usage"></a><a name="id15"></a><h3>Basic usage</h3><p>To use a tree, you will need both a tree back-end (a class inherited from <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTree.html'>ezcTree</a>), and a data store (implementation of the <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTreeDataStore.html'>ezcTreeDataStore</a> interface). The following example shows how to instantiate a new tree object using the <a href='/zetac
 omponents/documentation/trunk/Tree/phpdoc/ezcTreeXml.html'>ezcTreeXml</a> back-end and the <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTreeXmlInternalDataStore.html'>ezcTreeXmlInternalDataStore</a> data store:</p><ol class="code">
+        </a></p></td></tr></tbody></table><dl class="footnote"><dt><a href="#_footnote_id10" name="id10">1</a></dt><dd>Available through the <a href="../TreeDatabaseTiein/tutorial.html#introduction">TreeDatabaseTiein</a> component</dd></dl><dl class="footnote"><dt><a href="#_footnote_id11" name="id11">2</a></dt><dd>Available through the <a href="../TreePersistentObjectTiein/tutorial.html#introduction">TreePersistentObjectTiein</a> component</dd></dl><a name="dependencies"></a><a name="id13"></a><h3>Dependencies</h3><p>From the table and comments above, it becomes apparent that there are a few optional dependencies. Through the <a href="../TreeDatabaseTiein/tutorial.html#introduction">TreeDatabaseTiein</a> and <a href="../TreePersistentObjectTiein/tutorial.html#introduction">TreePersistentObjectTiein</a> components, additional functionality becomes available.</p><a name="class-overview"></a><a name="id14"></a><h3>Class overview</h3><dl><dt>ezcTreeMemory, <a href='/zetacompone
 nts/documentation/trunk/Tree/phpdoc/ezcTreeXml.html'>ezcTreeXml</a></dt><dd>These two classes are available (without using the Tiein components) to store tree data in memory or in an XML file. There is a matching data store for each of those two classes (<a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTreeMemoryDataStore.html'>ezcTreeMemoryDataStore</a> and <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTreeXmlInternalDataStore.html'>ezcTreeXmlInternalDataStore</a>).</dd><dt>ezcTreeDbMaterializedPath, <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTreeDbNestedSet.html'>ezcTreeDbNestedSet</a>, <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTreeDbParentChild.html'>ezcTreeDbParentChild</a></dt><dd>These three back-ends are made available through the <a href="../TreeDatabaseTiein/tutorial.html#introduction">TreeDatabaseTiein</a> component. Each of them implements a different strategy for storing the relations between nodes. The 
 nature of your application will determine the appropriate back-end. For more information, see the <a href="#back-ends">Back-ends</a> section.</dd><dt>ezcTreeNode</dt><dd>This class represents one node of the tree. Objects of this class can be added to the tree. The object stores both the ID and data belonging to the node. Data is always fetched on demand, unless <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTreeNodeListIterator.html'>ezcTreeNodeListIterator</a> is used with the pre-fetch option.</dd><dt>ezcTreeNodeListIterator</dt><dd>This class can be used to iterate over an <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTreeNodeList.html'>ezcTreeNodeList</a>, which is returned by many of the node fetching operations (see the <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTree.html'>ezcTree</a> documentation for which operations are supported). It is advised to use this class to iterate through the nodes and not to simply use foreach(
 ) on a returned <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTreeNodeList.html'>ezcTreeNodeList</a>. This is because this class also supports pre-fetching associated data, which can drastically reduce the number of queries being run in case a database-based data store is used (such as <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTreeDbExternalTableDataStore.html'>ezcTreeDbExternalTableDataStore</a> or <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTreePersistentObjectDataStore.html'>ezcTreePersistentObjectDataStore</a>).</dd></dl><a name="basic-usage"></a><a name="id15"></a><h3>Basic usage</h3><p>To use a tree, you will need both a tree back-end (a class inherited from <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTree.html'>ezcTree</a>), and a data store (implementation of the <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTreeDataStore.html'>ezcTreeDataStore</a> interface). The following example shows ho
 w to instantiate a new tree object using the <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTreeXml.html'>ezcTreeXml</a> back-end and the <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTreeXmlInternalDataStore.html'>ezcTreeXmlInternalDataStore</a> data store:</p><ol class="code">
 <li><span style="color: #000000">&lt;?php</span></li>
 <li><span style="color: #0000FF">require_once&nbsp;</span><span style="color: #335533">'tutorial_autoload.php'</span><span style="color: #0000FF">;</span></li>
 <li></li>
@@ -216,7 +216,7 @@
 <li><span style="color: #0000FF">echo&nbsp;</span><span style="color: #000000">$memTree</span><span style="color: #0000FF">-&gt;</span><span style="color: #000000">getChildCountRecursive</span><span style="color: #0000FF">(&nbsp;</span><span style="color: #335533">'Elements'&nbsp;</span><span style="color: #0000FF">),&nbsp;</span><span style="color: #335533">"\n"</span><span style="color: #0000FF">;</span></li>
 <li><span style="color: #000000">?&gt;</span></li>
 
-</ol><p>Operations on trees based on <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTreeMemory.html'>ezcTreeMemory</a> are of course faster than operations on trees based on <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTreeDb.html'>ezcTreeDb</a> or <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTreeXml.html'>ezcTreeXml</a>.</p><a name="database-based-back-ends"></a><a name="id22"></a><h4>Database-based back-ends</h4><p>By installing the <a href="introduction_TreeDatabaseTiein.html">TreeDatabaseTiein</a> and <a href="introduction_TreePersistentObjectTiein.html">TreePersistentObjectTiein</a> components, a few more back-ends and data stores are available. There are three additional back-ends:</p><ol><li><p>ezcTreeDbParentChild - Uses the ID of the parent to keep track of the structure only.</p></li><li><p>ezcTreeDbNestedSet - Uses left/right values in addition to the parent ID that the <a href='/zetacomponents/documentation/trunk/Tree/ph
 pdoc/ezcTreeDbParentChild.html'>ezcTreeDbParentChild</a> back-end uses to keep track of the tree structure.</p></li><li><p>ezcTreeDbMaterializedPath - Uses /1/2/4/6/19/24 style paths to store the tree structure.</p></li></ol><p>Each of those three back-ends have different performance-related properties depending on which operation is run. The following table summarizes some of the properties of each algorithm:</p><table><thead><tr><th><p class="cell">Operation</p></th><th colspan="3"><p class="cell">Back-ends</p></th></tr><tr><th><p class="cell">Parent Child</p></th><th><p class="cell">Nested set</p></th><th><p class="cell">Materialized Path</p></th></tr></thead><tbody><tr><td><p class="cell">addChild()</p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell">Possibly long, as on average the left and right values of half of the nodes in the tree have to be updated.</p></td><td><p class="cell"><em>Simple operation.</em></p></td></tr><tr><td><p class=
 "cell">delete()</p></td><td><p class="cell">Recursive operation to find a whole tree.</p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em> but query has to use LIKE.</p></td></tr><tr><td><p class="cell">fetchChildren()</p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em></p></td></tr><tr><td><p class="cell">fetchNodeById()</p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em></p></td></tr><tr><td><p class="cell">fetchParent()</p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em></p></td></tr><tr><td><p class="cell">fetchPath()</p></td><td><p class="cell">Recursive operation to iterate over t
 he parents all the way to the root node.</p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em></p></td></tr><tr><td><p class="cell">fetchSubtreeBreadthFirst()</p></td><td><p class="cell">Recursive operation to find the whole subtree - order of nodes for each level is not guaranteed.</p></td><td><p class="cell">Recursive operation to find the whole subtree - order of nodes for each level is not guaranteed.</p></td><td><p class="cell">Recursive operation to find the whole subtree - order of nodes for each level is not guaranteed.</p></td></tr><tr><td><p class="cell">fetchSubtreeDepthFirst()</p></td><td><p class="cell">Recursive operation to find the whole subtree - order of nodes is not guaranteed.</p></td><td><p class="cell">Simple operation - order of nodes is the same order as when they were added.</p></td><td><p class="cell"><em>Simple operation.</em> but query has to use LIKE - order of nodes is not guaranteed.</p></
 td></tr><tr><td><p class="cell">getChildCount()</p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em></p></td></tr><tr><td><p class="cell">getChildCountRecursive()</p></td><td><p class="cell">Recursive operation to find the nodes in the whole subtree.</p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em> but query has to use LIKE.</p></td></tr><tr><td><p class="cell">getPathLength()</p></td><td><p class="cell">Recursive operation to iterate over the parents all the way to the root node.</p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em></p></td></tr><tr><td><p class="cell">hasChildNodes()</p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em></p
 ></td></tr><tr><td><p class="cell">isChildOf()</p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em></p></td></tr><tr><td><p class="cell">isDescendantOf()</p></td><td><p class="cell">Recursive operation to iterate over the parents until either the root node or when the node is found.</p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em></p></td></tr><tr><td><p class="cell">isSiblingOf()</p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em></p></td></tr><tr><td><p class="cell">move()</p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell">Possibly long, as on average the left and the right values of half of the nodes need to be updated - twice.</p></td><td><p class="cell">All 
 the nodes in the subtree that is moved need to be updated - this is done with string operations.</p></td></tr><tr><td><p class="cell">nodeExists()</p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em></p></td></tr><tr><td><p class="cell">setRootNode()</p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em></p></td></tr></tbody></table><a name="data-stores"></a><a name="id23"></a><h5>Data stores</h5><p>The database back-ends that the <a href="introduction_TreeDatabaseTiein.html">TreeDatabaseTiein</a> component provides also support two different data stores. One of them, <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTreeDbExternalTableDataStore.html'>ezcTreeDbExternalTableDataStore</a>, comes with the <a href="introduction_TreeDatabaseTiein.html"
 >TreeDatabaseTiein</a> component. Another one, <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTreePersistentObjectDataStore.html'>ezcTreePersistentObjectDataStore</a>, is provided through the <a href="introduction_TreePersistentObjectTiein.html">TreePersistentObjectTiein</a> component.</p><a name="database-table"></a><a name="id24"></a><h6>Database table</h6><p>ezcTreeDbExternalTableDataStore can be used in two different modes. In the first you specify a database field that is matched against the node's ID, and another field that is used for the "data" property belonging to a node. The next example illustrates this:</p><ol class="code">
+</ol><p>Operations on trees based on <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTreeMemory.html'>ezcTreeMemory</a> are of course faster than operations on trees based on <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTreeDb.html'>ezcTreeDb</a> or <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTreeXml.html'>ezcTreeXml</a>.</p><a name="database-based-back-ends"></a><a name="id22"></a><h4>Database-based back-ends</h4><p>By installing the <a href="../TreeDatabaseTiein/tutorial.html#introduction">TreeDatabaseTiein</a> and <a href="../TreePersistentObjectTiein/tutorial.html#introduction">TreePersistentObjectTiein</a> components, a few more back-ends and data stores are available. There are three additional back-ends:</p><ol><li><p>ezcTreeDbParentChild - Uses the ID of the parent to keep track of the structure only.</p></li><li><p>ezcTreeDbNestedSet - Uses left/right values in addition to the parent ID that the <a href='/zetacomponents/doc
 umentation/trunk/Tree/phpdoc/ezcTreeDbParentChild.html'>ezcTreeDbParentChild</a> back-end uses to keep track of the tree structure.</p></li><li><p>ezcTreeDbMaterializedPath - Uses /1/2/4/6/19/24 style paths to store the tree structure.</p></li></ol><p>Each of those three back-ends have different performance-related properties depending on which operation is run. The following table summarizes some of the properties of each algorithm:</p><table><thead><tr><th><p class="cell">Operation</p></th><th colspan="3"><p class="cell">Back-ends</p></th></tr><tr><th><p class="cell">Parent Child</p></th><th><p class="cell">Nested set</p></th><th><p class="cell">Materialized Path</p></th></tr></thead><tbody><tr><td><p class="cell">addChild()</p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell">Possibly long, as on average the left and right values of half of the nodes in the tree have to be updated.</p></td><td><p class="cell"><em>Simple operation.</em></p></t
 d></tr><tr><td><p class="cell">delete()</p></td><td><p class="cell">Recursive operation to find a whole tree.</p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em> but query has to use LIKE.</p></td></tr><tr><td><p class="cell">fetchChildren()</p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em></p></td></tr><tr><td><p class="cell">fetchNodeById()</p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em></p></td></tr><tr><td><p class="cell">fetchParent()</p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em></p></td></tr><tr><td><p class="cell">fetchPath()</p></td><td><p class="cell">Recursive ope
 ration to iterate over the parents all the way to the root node.</p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em></p></td></tr><tr><td><p class="cell">fetchSubtreeBreadthFirst()</p></td><td><p class="cell">Recursive operation to find the whole subtree - order of nodes for each level is not guaranteed.</p></td><td><p class="cell">Recursive operation to find the whole subtree - order of nodes for each level is not guaranteed.</p></td><td><p class="cell">Recursive operation to find the whole subtree - order of nodes for each level is not guaranteed.</p></td></tr><tr><td><p class="cell">fetchSubtreeDepthFirst()</p></td><td><p class="cell">Recursive operation to find the whole subtree - order of nodes is not guaranteed.</p></td><td><p class="cell">Simple operation - order of nodes is the same order as when they were added.</p></td><td><p class="cell"><em>Simple operation.</em> but query has to use LIKE - order of nodes 
 is not guaranteed.</p></td></tr><tr><td><p class="cell">getChildCount()</p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em></p></td></tr><tr><td><p class="cell">getChildCountRecursive()</p></td><td><p class="cell">Recursive operation to find the nodes in the whole subtree.</p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em> but query has to use LIKE.</p></td></tr><tr><td><p class="cell">getPathLength()</p></td><td><p class="cell">Recursive operation to iterate over the parents all the way to the root node.</p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em></p></td></tr><tr><td><p class="cell">hasChildNodes()</p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>S
 imple operation.</em></p></td></tr><tr><td><p class="cell">isChildOf()</p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em></p></td></tr><tr><td><p class="cell">isDescendantOf()</p></td><td><p class="cell">Recursive operation to iterate over the parents until either the root node or when the node is found.</p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em></p></td></tr><tr><td><p class="cell">isSiblingOf()</p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em></p></td></tr><tr><td><p class="cell">move()</p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell">Possibly long, as on average the left and the right values of half of the nodes need to be updated - twice.</p></td>
 <td><p class="cell">All the nodes in the subtree that is moved need to be updated - this is done with string operations.</p></td></tr><tr><td><p class="cell">nodeExists()</p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em></p></td></tr><tr><td><p class="cell">setRootNode()</p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em></p></td><td><p class="cell"><em>Simple operation.</em></p></td></tr></tbody></table><a name="data-stores"></a><a name="id23"></a><h5>Data stores</h5><p>The database back-ends that the <a href="../TreeDatabaseTiein/tutorial.html#introduction">TreeDatabaseTiein</a> component provides also support two different data stores. One of them, <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTreeDbExternalTableDataStore.html'>ezcTreeDbExternalTableDataStore</a>, comes with the <a href="
 ../TreeDatabaseTiein/tutorial.html#introduction">TreeDatabaseTiein</a> component. Another one, <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTreePersistentObjectDataStore.html'>ezcTreePersistentObjectDataStore</a>, is provided through the <a href="../TreePersistentObjectTiein/tutorial.html#introduction">TreePersistentObjectTiein</a> component.</p><a name="database-table"></a><a name="id24"></a><h6>Database table</h6><p>ezcTreeDbExternalTableDataStore can be used in two different modes. In the first you specify a database field that is matched against the node's ID, and another field that is used for the "data" property belonging to a node. The next example illustrates this:</p><ol class="code">
 <li><span style="color: #000000">&lt;?php</span></li>
 <li><span style="color: #0000FF">require_once&nbsp;</span><span style="color: #335533">'tutorial_autoload.php'</span><span style="color: #0000FF">;</span></li>
 <li></li>
@@ -340,7 +340,7 @@
 <li><span style="color: #000000">var_dump</span><span style="color: #0000FF">(&nbsp;</span><span style="color: #000000">$fe&nbsp;</span><span style="color: #0000FF">);</span></li>
 <li><span style="color: #000000">?&gt;</span></li>
 
-</ol><p>The database tables are set up just like the previous example in lines 5 to 24. Lines 26 to 32 then continue to use the <a href="introduction_DatabaseSchema.html">DatabaseSchema</a> component to write persistent definition files and class stubs. The store is set up in lines 35 and 36. <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTreePersistentObjectDataStore.html'>ezcTreePersistentObjectDataStore</a> uses <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcPersistentSession.html'>ezcPersistentSession</a> as the first argument and then the object's class and object's ID property as second and third arguments. Unlike the previous example, you should specify the class and property names of the persistent objects that you are storing - <em>not</em> the table name and ID field. Lines 39 to 48 then show how data is inserted into the tree, and how it is retrieved. You will most likely have to tune the classes that are generated for you in a real life 
 situation, as the generated classes (line 29 and 31) only have private properties and the getState() and setState() methods that persistent objects are required to have. Refer to the <a href="introduction_PersistentObject.html">PersistentObject</a> documentation for more information.</p><a name="visualization"></a><a name="id26"></a><h3>Visualization</h3><p>Sometimes it is useful to visualize a tree structure. The Tree component has some functionality for this in the form of different visualizers. There are currently three possibilities.</p><a name="text-based-visualization"></a><a name="id27"></a><h4>Text-based visualization</h4><p>The <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTreeVisitorPlainText.html'>ezcTreeVisitorPlainText</a> class implements a visitor pattern to render a tree for the console. Both latin1 and utf-8 are supported as character sets, and the utf-8 version looks much better. The following example shows how to generated a text-based repres
 entation of the tree from the first example in this tutorial:</p><ol class="code">
+</ol><p>The database tables are set up just like the previous example in lines 5 to 24. Lines 26 to 32 then continue to use the <a href="../DatabaseSchema/tutorial.html#introduction">DatabaseSchema</a> component to write persistent definition files and class stubs. The store is set up in lines 35 and 36. <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTreePersistentObjectDataStore.html'>ezcTreePersistentObjectDataStore</a> uses <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcPersistentSession.html'>ezcPersistentSession</a> as the first argument and then the object's class and object's ID property as second and third arguments. Unlike the previous example, you should specify the class and property names of the persistent objects that you are storing - <em>not</em> the table name and ID field. Lines 39 to 48 then show how data is inserted into the tree, and how it is retrieved. You will most likely have to tune the classes that are generated for you in 
 a real life situation, as the generated classes (line 29 and 31) only have private properties and the getState() and setState() methods that persistent objects are required to have. Refer to the <a href="../PersistentObject/tutorial.html#introduction">PersistentObject</a> documentation for more information.</p><a name="visualization"></a><a name="id26"></a><h3>Visualization</h3><p>Sometimes it is useful to visualize a tree structure. The Tree component has some functionality for this in the form of different visualizers. There are currently three possibilities.</p><a name="text-based-visualization"></a><a name="id27"></a><h4>Text-based visualization</h4><p>The <a href='/zetacomponents/documentation/trunk/Tree/phpdoc/ezcTreeVisitorPlainText.html'>ezcTreeVisitorPlainText</a> class implements a visitor pattern to render a tree for the console. Both latin1 and utf-8 are supported as character sets, and the utf-8 version looks much better. The following example shows how to gener
 ated a text-based representation of the tree from the first example in this tutorial:</p><ol class="code">
 <li><span style="color: #000000">&lt;?php</span></li>
 <li><span style="color: #0000FF">require_once&nbsp;</span><span style="color: #335533">'tutorial_autoload.php'</span><span style="color: #0000FF">;</span></li>
 <li></li>
@@ -423,7 +423,7 @@
 
 </ol><p>However, in order to actually render the menu, you need to have some specific JavaScript in the head element of your HTML code. First of all, you need to include the YUI code:</p><code class="block">&lt;script type="text/javascript" src="http://yui.yahooapis.com/2.3.1/build/yahoo-dom-event/yahoo-dom-event.js"&gt;&lt;/script&gt;
 &lt;script type="text/javascript" src="http://yui.yahooapis.com/2.3.1/build/container/container_core-min.js"&gt;&lt;/script&gt;
-&lt;script type="text/javascript" src="http://yui.yahooapis.com/2.3.1/build/menu/menu-min.js"&gt;&lt;/script&gt;</code><p>Then, you need the following code to turn the generated menu into a YUI menu (the {literal} opening and closing tag is required if you use the <a href="introduction_Template.html">Template</a> component):</p><code class="block">&lt;script type="text/javascript"&gt;
+&lt;script type="text/javascript" src="http://yui.yahooapis.com/2.3.1/build/menu/menu-min.js"&gt;&lt;/script&gt;</code><p>Then, you need the following code to turn the generated menu into a YUI menu (the {literal} opening and closing tag is required if you use the <a href="../Template/tutorial.html#introduction">Template</a> component):</p><code class="block">&lt;script type="text/javascript"&gt;
 {literal}
 YAHOO.util.Event.onContentReady('overview', function () {
     var oMenu = new YAHOO.widget.MenuBar("menu", { autosubmenudisplay: true, showdelay: 200 });