<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://nl.simply-life.net/cheetah"  xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>ChEeTaH&#039;s (NL) blogs</title>
 <link>http://nl.simply-life.net/cheetah/blog/cheetah</link>
 <description></description>
 <language>nl</language>
<item>
 <title>Sims Programma&#039;s nu Open Source!</title>
 <link>http://nl.simply-life.net/cheetah/blog/2010-08-10/sims-programmas-nu-open-source</link>
 <description>&lt;p&gt;Het is een aardige tijd geleden dat de Sims community actief bezig was met the Sims 1. In die tijd heb ik twee programma&#039;s geschreven voor het spel: The Neighborhood Handler en The Add-on Handler. Bijna drie jaar geleden besloot ik de broncode van deze twee beschikbaar te maken onder de &lt;a href=&quot;http://www.gnu.org/licenses/gpl-2.0.html&quot;&gt;GPL2 licentie&lt;/a&gt;. Er is nogal wat tijd overheen gegaan en de broncode was openbaar beschikbaar, maar dat had ik nooit aangekondigd. Tijd om dat te veranderen: bij dezen dus die aankondiging (en meer)!&lt;/p&gt;
&lt;p&gt;The Neighborhood Handler en The Add-on Handler zijn nu dus open source software! Ik moet zeggen dat ik de code niet heb opgeschoond of wat dan ook; het is niet veel meer dan een dump van de code die ik al die jaren geleden geschreven heb. Ik moest het nog leren destijds, dus ik neem aan dat het vol zit met bugs, slechte code en andere nachtmerries. Mocht iemand het echter willen oppakken om een van deze twee projecten te verbeteren (of te herschrijven), dan kan dat nu. Als je gewoon een kijkje wilt nemen: dat kan nu ook.&lt;/p&gt;
&lt;p&gt;Wat betreft The Neighborhood Handler: ik heb een kleine herstart gemaakt voor een nieuwe versie (nog steeds C++, maar gebruik makend van &lt;a href=&quot;http://qt.nokia.com/&quot;&gt;Qt&lt;/a&gt; voor de interface). Alhoewel ik er nog niet heel veel tijd in heb kunnen steken, is de code wel beschikbaar voor wie er dan ook mee wilt werken.&lt;/p&gt;
&lt;p&gt;Er is ook iets handigs voor de makers van Sims 2 content: ik heb aardig wat werk in een Sims 2 Packer gestoken, waarmee je de bekende &lt;code&gt;.package&lt;/code&gt; bestanden kunt inpakken voor de Sims 2 (naar de bekende .Sims2Pack bestanden). Dit project is mogelijk ook nuttig als basis voor een vergelijkbaar Sims 3 programma, omdat het bestandsformaat redelijk overeenkomt. Ik ben er nooit aan toe gekomen om dit project af te ronden en te publiceren, maar wellicht is het wel nuttig voor iemand.&lt;/p&gt;
&lt;p&gt;Voor alle open broncode, waaronder ook nog Drupal projecten en andere programmaatjes die ik lang geleden heb gemaakt: bezoek &lt;a href=&quot;http://git.simply-life.net/&quot;&gt;mijn publieke git repositories&lt;/a&gt;. Als je alleen geïnteresseerd bent in de bovengenoemde projecten, ga naar:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://git.simply-life.net/?a=summary&amp;amp;p=TheNeighborhoodHandler&quot;&gt;TheNeighborhoodHandler&lt;/a&gt; repository (zie de &lt;a href=&quot;http://git.simply-life.net/?a=shortlog&amp;amp;p=TheNeighborhoodHandler&amp;amp;h=refs/heads/4.1&quot;&gt;4.1 branch&lt;/a&gt; voor de oude versie, of de &lt;a href=&quot;http://git.simply-life.net/?a=shortlog&amp;amp;p=TheNeighborhoodHandler&amp;amp;h=refs/heads/master&quot;&gt;master branch&lt;/a&gt; voor de nieuwe nog-bijna-niets- gedaan versie)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://git.simply-life.net/?a=summary&amp;amp;p=TheAddonHandler&quot;&gt;TheAddonHandler&lt;/a&gt; repository&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://git.simply-life.net/?a=summary&amp;amp;p=libSims2Pack&quot;&gt;libSims2Pack&lt;/a&gt; repository&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://git.simply-life.net/?a=summary&amp;amp;p=Sims2PackerUI&quot;&gt;Sims2PackerUI&lt;/a&gt; repository (vereist libSims2Pack)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;De oude software heeft Borland C++ Builder nodig om gebakken te worden. Het nieuwere spul (de nieuwe versie van The Neighborhood Handler, libSims2Pack en Sims2PackerUI) gebruiken &lt;a href=&quot;http://www.cmake.org&quot;&gt;CMake&lt;/a&gt; als build system en is afhankelijk van &lt;a href=&quot;http://qt.nokia.com/&quot;&gt;Qt&lt;/a&gt; (beide zijn gratis te downloaden). Je kunt de Qt Creator gebruiken om al die code te compileren en te debuggen.&lt;/p&gt;
&lt;p&gt;Let wel op dat dit allemaal niet echt nuttig is als je de tools direct wilt gebruiken en niet geïnteresseerd bent in de daadwerkelijke broncode. Ik heb momenteel geen (recente) binaries/installaties beschikbaar. Je kunt The Neighborhood Handler en The Add-on Handler nog wel op &lt;a href=&quot;http://www.thesimszone.co.uk&quot;&gt;The Sims Zone&lt;/a&gt; vinden.&lt;/p&gt;
&lt;p&gt;Neem gerust &lt;a href=&quot;contact&quot;&gt;contact met mij op&lt;/a&gt; als je vragen hebt over de code, of als je de ontwikkeling van een of meer van deze projecten wilt voortzetten: ik kan schrijfrechten geven op de repositories als je serieus verder wilt gaan. Het is niet waarschijnlijk dat ik binnenkort iets met deze code ga doen.&lt;/p&gt;
&lt;p&gt;Al met al is dit vooral verouderd spul, maar toch hoop ik dat iemand het nuttig vindt!&lt;/p&gt;
</description>
 <comments>http://nl.simply-life.net/cheetah/blog/2010-08-10/sims-programmas-nu-open-source#comments</comments>
 <category domain="http://nl.simply-life.net/cheetah/tag/libsims2pack">libSims2Pack</category>
 <category domain="http://nl.simply-life.net/cheetah/tag/open-source">Open Source</category>
 <category domain="http://nl.simply-life.net/cheetah/tag/sims">Sims</category>
 <category domain="http://nl.simply-life.net/cheetah/tag/sims2packerui">Sims2PackerUI</category>
 <category domain="http://nl.simply-life.net/cheetah/tag/add-handler">The Add-on Handler</category>
 <category domain="http://nl.simply-life.net/cheetah/tag/neighborhood-handler">The Neighborhood Handler</category>
 <category domain="http://nl.simply-life.net/cheetah/tag/-sims-zone">The Sims Zone</category>
 <pubDate>Tue, 10 Aug 2010 21:05:37 +0000</pubDate>
 <dc:creator>ChEeTaH</dc:creator>
 <guid isPermaLink="false">73 at http://nl.simply-life.net/cheetah</guid>
</item>
<item>
 <title>Drupal Ontwikkeling eenvoudiger met de Qt Assistant - Deel 3b</title>
 <link>http://nl.simply-life.net/cheetah/blog/2010-08-10/drupal-ontwikkeling-eenvoudiger-met-de-qt-assistant-deel-3b</link>
 <description>&lt;p&gt;Weet je nog hoe we de &lt;a href=&quot;http://nl.simply-life.net/cheetah/node/68&quot;&gt;vorige keer&lt;/a&gt; Doxygen commentaar in Drupal dusdanig verwerkte, zodat het ook in de uitvoer van Doxygen er goed uit zou zien? Tijd voor een nieuw deel in de serie, en we gaan nog even door met reparaties. Moet je de boel nog goed opzetten, omdat je de eerdere delen misschien gemist hebt? Lees dan eerst delen &lt;a href=&quot;http://nl.simply-life.net/cheetah/node/58&quot;&gt;1&lt;/a&gt;, &lt;a href=&quot;http://nl.simply-life.net/cheetah/node/64&quot;&gt;2&lt;/a&gt; en vooral &lt;a href=&quot;http://nl.simply-life.net/cheetah/node/68&quot;&gt;3a&lt;/a&gt; voordat je verder gaat. Deze keer: het werkend krijgen van speciale HTML documentatie zoals de Forms API. Beginnen maar!&lt;/p&gt;
&lt;!--break--&gt;&lt;!--break--&gt;&lt;h4&gt;Het probleem&lt;/h4&gt;
&lt;p&gt;In de Drupal documentatie worden alle links, inclusief die naar andere pagina&#039;s, gemaakt met behulp van het &lt;em&gt;@link&lt;/em&gt; commando. We hebben eerder al de externe en Drupal-specifieke links gerepareerd. Onze Doxygen documentatie bevat echter nog steeds sommige onderwerpen niet omdat Doxygen HTML files niet zomaar oppikt of toevoegt. Vanwege de manier waarop Doxygen alles verwerkt, blijven de gedefinieerde links wijzen naar iets dat niet bestaat. De links werken dus niet, en we hebben de documentatie niet bij de rest zitten.&lt;/p&gt;
&lt;p&gt;We kunnen natuurlijk gewoon de links aanpassen en naar de externe pagina&#039;s op &lt;a href=&quot;http://api.drupal.org&quot;&gt;api.drupal.org&lt;/a&gt; laten wijzen. Maar zou het niet beter zijn als we alle documentatie op dezelfde plek hebben? Daar gaan we nu voor zorgen!&lt;/p&gt;
&lt;h4&gt;Meer preprocessen&lt;/h4&gt;
&lt;p&gt;Herinner je dat we in onze preprocessor wat ruimte hadden overgelaten voor HTML verwerking? We gaan nu een &lt;em&gt;HtmlPreprocessor&lt;/em&gt; toevoegen. Later zorgen we ervoor dat Doxygen de HTML bestanden ook meeneemt. Met onze speciale preprocessor zorgen we dat Doxygen de HTML pagina&#039;s maakt en toevoegt. Vervolgens kunnen we daar naar linken ook al passen we de links niet aan.&lt;/p&gt;
&lt;p&gt;Eerst wat structuur. Open het  &lt;em&gt;preprocess-drupal-doxygen.php&lt;/em&gt; bestand in je teksteditor of IDE. Onder de &lt;em&gt;CodePreprocessor&lt;/em&gt; klasse, voeg je het volgende skelet toe:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;geshifilter&quot;&gt;&lt;div class=&quot;php geshifilter-php&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;class&lt;/span&gt; HtmlPreprocessor &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;extends&lt;/span&gt; Preprocessor &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$_basename&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #009933; font-style: italic;&quot;&gt;/**&amp;lt; The basename of the filename */&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; __construct &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$filename&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: bold; font-style: italic;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    Preprocessor&lt;span style=&quot;color: #339933;&quot;&gt;::&lt;/span&gt;__construct&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$filename&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #000088;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;_basename &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/basename&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;basename&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$filename&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;  &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;protected&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; doProcess&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: bold; font-style: italic;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// We will go and fill this in soon...&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;  &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;De constructor hebben we al gemaakt, die slaat de basisnaam van het bestand dat we verwerken op (dat is de bestandsnaam zonder pad of directory-informatie). Dat hebben we verderop nodig. De &lt;em&gt;doProcess()&lt;/em&gt; functie is er ook al bij, maar heeft nog wat inhoud nodig.&lt;/p&gt;
&lt;p&gt;Vergeet niet dat de &lt;em&gt;$contents&lt;/em&gt; variabele het hele HTML document opslaat. Dit is inclusief headers, rommel op het eind en nog veel meer. Maar voor toekomstige handigheid, of zelfs voor je eigen projecten, wil je misschien een simpele HTML pagina met alleen de inhoud maken. Dat bestand zelf is dan misschien geen correcte HTML, maar dat komt wel goed als we het in Doxygen zetten. Wat de invoer ook is, we gaan het zo goed mogelijk vewerken.&lt;/p&gt;
&lt;h4&gt;Vissen naar de titel&lt;/h4&gt;
&lt;p&gt;Het eerste deel van de &lt;em&gt;doProcess&lt;/em&gt; functie haalt de titel uit het document. Bij voorkeur staat deze in een &amp;lt;title&amp;gt; tag. Maar als we geen header hebben en deze tag niet bestaat, willen we misschien zoeken in tags als &amp;lt;h1&amp;gt; tot en met &amp;lt;h6&amp;gt;. Voor elk van deze tags kijken we of die in het document voorkomt en niet leeg is. We pakken de inhoud van de tag en zorgen dat alles op &amp;eacute;&amp;eacute;n regel staat. Mocht het document dan de regel midden in de titel afbreken, dan schopt dat onze documentatie niet in de war.&lt;/p&gt;
&lt;p&gt;Als er geen tags gevonden worden, vallen we terug op de oorspronkelijke bestandsnaam. Hiermee krijgen we dus de volgende code, waarvan de reguliere expressie is ge&amp;iuml;nspireerd op code uit de Drupal API module:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;geshifilter&quot;&gt;&lt;div class=&quot;php geshifilter-php&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// Find title in the first listed tag that&#039;s in the file&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #000088;&quot;&gt;$title&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #009900; font-weight: bold;&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #000088;&quot;&gt;$titleTags&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;title&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;h1&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;h2&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;h3&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;h4&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;h5&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;h6&#039;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #b1b100;&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$titleTags&lt;/span&gt; &lt;span style=&quot;color: #b1b100;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$tag&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: bold; font-style: italic;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #000088;&quot;&gt;$titleMatch&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/preg_match&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;preg_match&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;@&amp;lt;&#039;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$tag&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;(\s.*?)?&amp;gt;\s*(\w.*?)\s*&amp;lt;/&#039;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$tag&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;\s*?&amp;gt;@is&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$titleMatch&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;        &lt;span style=&quot;color: #000088;&quot;&gt;$title&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/str_replace&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;str_replace&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot;&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$titleMatch&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// Make sure it&#039;s all on one line&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;        &lt;span style=&quot;color: #b1b100;&quot;&gt;break&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: bold; font-style: italic;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/isset&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$title&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #000088;&quot;&gt;$title&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;_basename&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/p&gt;
&lt;h4&gt;En de rest?&lt;/h4&gt;
&lt;p&gt;Nu de daadwerkelijke inhoud. We hebben twee gevallen, zoals eerder beschreven: geval &amp;eacute;&amp;eacute;n is dat het bestand een volledige HTML pagina is (inclusief header enzovoorts, en de erg belangrijke &amp;lt;body&amp;gt; tag), of we hebben een wat rommeliger document met alleen de inhoud zelf (zonder &amp;lt;body&amp;gt; tag).&lt;/p&gt;
&lt;p&gt;Wat doen we dan? Zoals hierboven ook gedaan is, gaan we de inhoud van de &amp;lt;body&amp;gt; tag proberen te pakken te krijgen. Vinden we niks, dan pakken we gewoon het hele bestand:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;geshifilter&quot;&gt;&lt;div class=&quot;php geshifilter-php&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// Get &amp;lt;body&amp;gt; of HTML, if present (otherwise use whole document)&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #000088;&quot;&gt;$bodyMatch&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/preg_match&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;preg_match&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;!&amp;lt;body(\s.*?)?&amp;gt;(.*)&amp;lt;/body(\s.*?)?&amp;gt;!is&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$bodyMatch&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$bodyMatch&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: bold; font-style: italic;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/str_replace&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;str_replace&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot;&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot;&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt; * &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/preg_replace&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;preg_replace&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;!([@\\\\])endhtmlonly!&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;\\1&amp;lt;span&amp;gt;endhtmlonly&amp;lt;/span&amp;gt;&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;De op een na laatste regel springt elke regel in met &quot;&lt;span class=&quot;geshifilter&quot;&gt;&lt;code class=&quot;text geshifilter-text&quot;&gt;&amp;nbsp;* &lt;/code&gt;&lt;/span&gt;&quot;. Doxygen haalt dit weer weg uit z&#039;n uitvoer. Maar waarom doen we dat dan? Stel dat het HTML document ergens een regel heeft die begint met &quot;&lt;span class=&quot;geshifilter&quot;&gt;&lt;code class=&quot;text geshifilter-text&quot;&gt;&amp;nbsp;* &lt;/code&gt;&lt;/span&gt;&quot;, dan willen we dat behouden in de uitvoer. Door deze inspringing toe te voegen, verwijdert Doxygen alleen het extra toegevoegde deel en niets anders.&lt;/p&gt;
&lt;p&gt;Een ander probleem is dat het document het Doxygen commando &lt;em&gt;@endhtmlonly&lt;/em&gt; kan bevatten. Zoals je later zult zien, kan dit problemen veroorzaken omdat het ons &lt;em&gt;@htmlonly&lt;/em&gt; blok, waarmee we hieronder de HTML code letterlijk zullen invoegen, zal afbreken. Let op dat in dit blok alleen het &lt;em&gt;@endhtmlonly&lt;/em&gt; door Doxygen herkent wordt. Het escapen van het commando heeft geen zin, dus we gaan het een beetje &quot;slopen&quot; waar het ook voorkomt. Dit doen we door het &lt;em&gt;endhtmlonly&lt;/em&gt; deel in een (verder nutteloze) &amp;lt;span&amp;gt; tag te zetten. Je ziet geen verschil, maar Doxygen ziet &lt;em&gt;@&amp;lt;span&amp;gt;endhtmlonly&amp;lt;/span&amp;gt;&lt;/em&gt; en blijft doorgaan met het uitspugen van letterlijke HTML code. Succes gegarandeerd!&lt;/p&gt;
&lt;p&gt;Het laatste probleem dat we hebben is dat er nog referenties naar andere documenten te vinden is. De Forms API Quickstart en Forms API Reference wijzen bijvoorbeeld naar elkaar, door middel van absolute links naar &lt;a href=&quot;http://api.drupal.org&quot;&gt;api.drupal.org&lt;/a&gt;. Het werkt, maar we hebben alle documentatie al in Doxygen, dus waarom kunnen we niet daar naartoe linken?&lt;/p&gt;
&lt;p&gt;We gaan dus wat links vervangen. Voeg de volgende functie toe aan de &lt;em&gt;HtmlPreprocessor&lt;/em&gt;:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;geshifilter&quot;&gt;&lt;div class=&quot;php geshifilter-php&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; replaceLinks&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$links&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #b1b100;&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$links&lt;/span&gt; &lt;span style=&quot;color: #b1b100;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$original&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$new&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #000088;&quot;&gt;$re&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;/(&amp;lt;a\s+[^&amp;gt;]*)href=([&amp;quot;\&#039;])&#039;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;a href=&quot;http://www.php.net/str_replace&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;str_replace&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;/&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;\/&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$original&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;(\/\S*)?\\2/si&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/preg_replace&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;preg_replace&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$re&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;\\1href=\\2&#039;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$new&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;\\2&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: bold; font-style: italic;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;  &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Deze functie zoekt links op die we in de &lt;em&gt;$links&lt;/em&gt; array meegeven (als array sleutels), en vervangt deze met de bijbehorende waarde uit de array. Ook langere URLs worden meegenomen, als de URL verder gaat met een slash en dan de rest. Gevolg is dat een link naar &lt;em&gt;http://api.drupal.org/api/file/developer/topics/forms_api_reference.html/6&lt;/em&gt; verandert in gewoon &lt;em&gt;forms_api_reference.html&lt;/em&gt; als we de functie als volgt aanroepen (voeg dit toe aan de &lt;em&gt;doProcess()&lt;/em&gt; functie):&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;geshifilter&quot;&gt;&lt;div class=&quot;php geshifilter-php&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;replaceLinks&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;http://api.drupal.org/api/file/developer/topics/forms_api.html&#039;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;forms_api.html&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;http://api.drupal.org/api/file/developer/topics/forms_api_reference.html&#039;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;forms_api_reference.html&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;http://api.drupal.org/api/file/developer/topics/javascript_startup_guide.html&#039;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;javascript_startup_guide.html&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: bold; font-style: italic;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Nu de belangrijkste stap: een Doxygen commentaarblok maken en de HTML code invoegen. We geven Doxygen wat documentatie over het bestand zelf, en maken daarnaast een Doxygen &lt;a href=&quot;http://www.stack.nl/~dimitri/doxygen/commands.html#cmdpage&quot;&gt;pagina&lt;/a&gt; met wat HTML inhoud. Dit gebeurt met het volgende blok:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;geshifilter&quot;&gt;&lt;div class=&quot;php geshifilter-php&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot;/**&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;              &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// Clone page&#039;s documentation in File listing&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;              &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot; * @file&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;              &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot; * @brief @link &lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;{$this-&amp;gt;_basename}&lt;/span&gt; &lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;{$title}&lt;/span&gt; @endlink&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: bold; font-style: italic;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;              &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot; * &lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;              &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot; * This file contains a special documentation topic: @link &lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;{$this-&amp;gt;_basename}&lt;/span&gt; &lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;{$title}&lt;/span&gt; @endlink.&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;              &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot; */&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;              &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// Create custom page&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;              &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot;/**&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: bold; font-style: italic;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;              &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot; * @page &lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;{$this-&amp;gt;_basename}&lt;/span&gt; &lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;{$title}&lt;/span&gt;&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;              &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot; * &lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;              &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot; * @htmlonly&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;              &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot; * &amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot;&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;              &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot; * @endhtmlonly&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: bold; font-style: italic;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;              &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot; */&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Het enige probleem dat hier over blijft is dat de documentatie van het bestand, als je via de bestandenlijst van Doxygen gaat, niet de documentatie zelf bevat. In plaats daarvan is er alleen een verwijzing naar de eigen pagina die gemaakt is, waar wel alles staat. Als je dat prettiger vindt, kun je de drie regels vanaf &lt;em&gt;@htmlonly&lt;/em&gt; tot &lt;em&gt;@endhtmlonly&lt;/em&gt; kopieren naar de bestandsdocumentatie. Je moet echter de andere pagina laten staan, anders zullen de (ongewijzigde) links naar de pagina niet werken.&lt;/p&gt;
&lt;p&gt;Je kunt nu naar de documentatie waar je maar wilt met behulp van het Doxygen commando &lt;em&gt;@link&lt;/em&gt; (bijv. &quot;&lt;em&gt;@link bestand.html Mijn Link Tekst @endlink&lt;/em&gt;&quot;).&lt;/p&gt;
&lt;p&gt;Er is nog een laatste ding dat onze preprocessor moet doen: de &lt;em&gt;HtmlPreprocessor&lt;/em&gt; maken en gebruiken. Als je het script van de vorige keer hebt gebruikt, zoek dan de regel (vrij ver onderaan) op, waar staat &lt;span class=&quot;geshifilter&quot;&gt;&lt;code class=&quot;php geshifilter-php&quot;&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// HTML Processing is for later...&lt;/span&gt;&lt;/code&gt;&lt;/span&gt;. Gevonden? Vervang deze regel met de volgende:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;geshifilter&quot;&gt;&lt;div class=&quot;php geshifilter-php&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$processor&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;new&lt;/span&gt; HtmlPreprocessor&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$filename&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Dat is alles voor de preprocessor. Als je ergens de weg kwijt bent geraakt, kun je het hele script hieronder downloaden. Alle code is overigens GPL v2 code, dus voel je vrij om het aan te passen, te hergebruiken en verder te verspreiden.&lt;/p&gt;
&lt;h4&gt;Maar Doxygen leest nog steeds geen HTML bestanden!&lt;/h4&gt;
&lt;p&gt;Nu de preprocessor helemaal klaar is, kunnen we Doxygen de HTML bestanden laten gebruiken. Dit is relatief eenvoudig: eerder lieten we Doxygen alleen maar &lt;em&gt;.php&lt;/em&gt;, &lt;em&gt;.inc&lt;/em&gt;, &lt;em&gt;.module&lt;/em&gt; en &lt;em&gt;.install&lt;/em&gt; bestanden voor Drupal verwerken. Voeg gewoon &lt;em&gt;.html&lt;/em&gt; (en eventueel andere extensies die je gebruikt) toe aan de &lt;strong&gt;FILE_PATTERNS&lt;/strong&gt; lijst (&lt;strong&gt;Input&lt;/strong&gt; onderdeel) in de Doxywizard. Voer Doxygen uit, en de documentatie wordt netjes toegevoegd. Voor de Drupal documentatie kun je dit gelijk zien op de hoofdpagina met onderwerpen. Als alles klopt, werkt alles zoals verwacht.&lt;/p&gt;
&lt;div class=&quot;center&quot;&gt;
&lt;a href=&quot;http://nl.simply-life.net/cheetah/system/files/doxywizard6.png&quot; title=&quot;Doxywizard - FILE_PATTERNS setting&quot; rel=&quot;lightshow[fixingdoc]&quot;&gt;&lt;img src=&quot;http://nl.simply-life.net/cheetah/system/files/imagecache/thumbnail/doxywizard6.png&quot; alt=&quot;Doxywizard - FILE_PATTERNS setting&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://nl.simply-life.net/cheetah/system/files/htmldoc1.png&quot; title=&quot;Working HTML Documentation!&quot; rel=&quot;lightshow[fixingdoc]&quot;&gt;&lt;img src=&quot;http://nl.simply-life.net/cheetah/system/files/imagecache/thumbnail/htmldoc1.png&quot; alt=&quot;Working HTML Documentation!&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;h4&gt;Samenvatting&lt;/h4&gt;
&lt;p&gt;In &lt;a href=&quot;http://nl.simply-life.net/cheetah/blog/2009-11-10/drupal-ontwikkeling-eenvoudiger-met-de-qt-assistant-deel-1&quot;&gt;deel 1&lt;/a&gt; hebben we het systeem klaargemaakt, in &lt;a href=&quot;http://nl.simply-life.net/cheetah/blog/2009-11-22/drupal-ontwikkeling-eenvoudiger-met-de-qt-assistant-deel-2&quot;&gt;deel 2&lt;/a&gt; hebben we de Drupal documentatie in de Qt Assistant gezet. Nu hebben we fouten in de documentatie opgelost met wat eigen code uit &lt;a href=&quot;http://nl.simply-life.net/cheetah/blog/2010-07-27/drupal-ontwikkeling-eenvoudiger-met-de-qt-assistant-deel-3a&quot;&gt;deel 3a&lt;/a&gt; en dit deel. Vorige keer hebben we wat verschillen tussen de Drupal API module en Doxygen wat betreft het verwerken van commando&#039;s gecorrigeerd, zodat de Doxygen uitvoer overeenkomt met die van de module. Deze keer hebben we de code uitgebreid om geavanceerde onderwerpen uit HTML pagina&#039;s toe te voegen.&lt;/p&gt;
&lt;p&gt;Er is nog een laatste probleem. Alle documentatie, van Drupal core en alle modules, is op een grote hoop gegooit. Vaak is het echter wel prettig om de documentatie van een specifieke module te bekijken. Qt Assistant ondersteunt dit door ons een selectie van documentatiecollecties te tonen (en dat kan de hele bundel zijn, zoals nu). Hoe? Dat lees je binnenkort.&lt;/p&gt;
</description>
 <comments>http://nl.simply-life.net/cheetah/blog/2010-08-10/drupal-ontwikkeling-eenvoudiger-met-de-qt-assistant-deel-3b#comments</comments>
 <category domain="http://nl.simply-life.net/cheetah/tag/drupal">Drupal</category>
 <category domain="http://nl.simply-life.net/cheetah/tag/open-source">Open Source</category>
 <category domain="http://nl.simply-life.net/cheetah/tag/qt">Qt</category>
 <pubDate>Tue, 10 Aug 2010 20:03:34 +0000</pubDate>
 <dc:creator>ChEeTaH</dc:creator>
 <guid isPermaLink="false">71 at http://nl.simply-life.net/cheetah</guid>
</item>
<item>
 <title>Drupal Ontwikkeling eenvoudiger met de Qt Assistant - Deel 3a</title>
 <link>http://nl.simply-life.net/cheetah/blog/2010-07-27/drupal-ontwikkeling-eenvoudiger-met-de-qt-assistant-deel-3a</link>
 <description>&lt;p&gt;Welkom terug! Het is een tijd geleden sinds ik deel &lt;a href=&quot;http://nl.simply-life.net/cheetah/blog/2009-11-10/drupal-ontwikkeling-eenvoudiger-met-de-qt-assistant-deel-1&quot;&gt;een&lt;/a&gt; en &lt;a href=&quot;http://nl.simply-life.net/cheetah/blog/2009-11-22/drupal-ontwikkeling-eenvoudiger-met-de-qt-assistant-deel-2&quot;&gt;twee&lt;/a&gt; van deze serie heb gepost (ja, ik moet vaker bloggen...). Weet je nog dat ik de Drupal documentatie in de Qt Assistant, een handige viewer voor documentatie, aan het zetten was? Mooi. Ik heb goed nieuws: ik heb weer wat tijd gestoken in het in orde krijgen van de documentatie. Dus we gaan gelijk door!&lt;/p&gt;
&lt;!--break--&gt;&lt;!--break--&gt;&lt;h4&gt;Plan voor vandaag&lt;/h4&gt;
&lt;p&gt;In &lt;a href=&quot;http://nl.simply-life.net/cheetah/blog/2009-11-10/drupal-ontwikkeling-eenvoudiger-met-de-qt-assistant-deel-1&quot;&gt;deel een&lt;/a&gt; hebben we ons systeem voorbereid en de nodige tools klaar gemaakt voor het werk. In &lt;a href=&quot;http://nl.simply-life.net/cheetah/blog/2009-11-22/drupal-ontwikkeling-eenvoudiger-met-de-qt-assistant-deel-2&quot;&gt;deel twee&lt;/a&gt; kregen we de documentatie daadwerkelijk in de Qt Assistant, alhoewel er nog layout problemen waren zoals je misschien wel gemerkt hebt.&lt;/p&gt;
&lt;p&gt;Nadat we de veranderingen in de Drupal documentatie sinds de vorige keer weer opgepakt hebben, zoomen we nu in op (Drupal specifieke) problemen in de gegenereerde documentatie. Hierbij hoort vooral het terughalen van tekst die verloren gaat in het Doxygen proces, door de code vooraf te &quot;preprocessen.&quot; Dit is subdeel A, binnenkort krijgen we ook de specifieke onderwerpen (zoals de Forms API referentie) aan de praat in deel 3B.&lt;/p&gt;
&lt;h4&gt;Veranderingen sinds de vorige keer&lt;/h4&gt;
&lt;p&gt;Sinds de vorige keer zijn er enkele dingen veranderd in de bronnen die we gebruiken. Ook al gebruik ik nu een andere Linux distributie, lijkt het erop dat de Doxygen templates een make-over hebben gehad: je documentatie ziet er nu nog beter uit met de nieuwste versie. Alles heeft een wat moderner jasje, wat ik goed vind. Je wilt denk ik je software (Doxygen en Qt) even bijwerken naar de nieuwste versies als je dat niet al gedaan hebt, gewoon voor de handigheid.&lt;/p&gt;
&lt;p&gt;Een belangrijkere aanpassing is echter dat de Drupal Developer Documentatie op CVS niet meer de voorbeelden bevat. In plaats daarvan zijn ze vehruisd naar een &lt;a href=&quot;http://drupal.org/project/examples&quot;&gt;eigen project&lt;/a&gt;. Je kunt een snapshot van de geschikte versie downloaden en in je &lt;em&gt;developer&lt;/em&gt; subdirectory uitpakken (waar je Drupal Developer Documentatie staat). Een andere handige optie is om de voorbeelden ook van CVS te halen (zie &quot;&lt;em&gt;&lt;a href=&quot;http://drupal.org/node/321&quot;&gt;Checking out from the contributions repository&lt;/a&gt;&lt;/em&gt;&quot; voor gedetailleerde instructies):&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;geshifilter&quot;&gt;&lt;div class=&quot;bash geshifilter-bash&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;cvs&lt;/span&gt; &lt;span style=&quot;color: #660033;&quot;&gt;-z6&lt;/span&gt; -d:pserver:anonymous:anonymous&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;@&lt;/span&gt;cvs.drupal.org:&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;cvs&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;drupal-contrib checkout &lt;span style=&quot;color: #660033;&quot;&gt;-d&lt;/span&gt; developer&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;examples contributions&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;modules&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;examples&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Vergeet niet je developer documentatie ook bij te werken naar de laatste versie. Met name als je Drupal 6 gebruikt, wil je vast ook even de goede branch selecteren, als volgt (vanuit de Drupal directory, vervang &lt;span class=&quot;geshifilter&quot;&gt;&lt;code class=&quot;text geshifilter-text&quot;&gt;-r DRUPAL-6--1&lt;/code&gt;&lt;/span&gt; met &lt;span class=&quot;geshifilter&quot;&gt;&lt;code class=&quot;text geshifilter-text&quot;&gt;-A&lt;/code&gt;&lt;/span&gt; voor de laatste HEAD versie):&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;geshifilter&quot;&gt;&lt;div class=&quot;bash geshifilter-bash&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;cvs&lt;/span&gt; -d:pserver:anonymous:anonymous&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;@&lt;/span&gt;cvs.drupal.org:&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;cvs&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;drupal-contrib update &lt;span style=&quot;color: #660033;&quot;&gt;-d&lt;/span&gt; &lt;span style=&quot;color: #660033;&quot;&gt;-P&lt;/span&gt; &lt;span style=&quot;color: #660033;&quot;&gt;-r&lt;/span&gt; DRUPAL-&lt;span style=&quot;color: #000000;&quot;&gt;6&lt;/span&gt;--&lt;span style=&quot;color: #000000;&quot;&gt;1&lt;/span&gt; developer&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Gewoon voor de volledigheid, om een schone checkout te doen van al deze extra documentatie, gebruik je de volgende twee commando&#039;s:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;geshifilter&quot;&gt;&lt;div class=&quot;bash geshifilter-bash&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;cvs&lt;/span&gt; &lt;span style=&quot;color: #660033;&quot;&gt;-z6&lt;/span&gt; -d:pserver:anonymous:anonymous&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;@&lt;/span&gt;cvs.drupal.org:&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;cvs&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;drupal-contrib checkout &lt;span style=&quot;color: #660033;&quot;&gt;-r&lt;/span&gt; DRUPAL-&lt;span style=&quot;color: #000000;&quot;&gt;6&lt;/span&gt;--&lt;span style=&quot;color: #000000;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #660033;&quot;&gt;-d&lt;/span&gt; developer contributions&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;docs&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;developer
&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;cvs&lt;/span&gt; &lt;span style=&quot;color: #660033;&quot;&gt;-z6&lt;/span&gt; -d:pserver:anonymous:anonymous&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;@&lt;/span&gt;cvs.drupal.org:&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;cvs&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;drupal-contrib checkout &lt;span style=&quot;color: #660033;&quot;&gt;-r&lt;/span&gt; DRUPAL-&lt;span style=&quot;color: #000000;&quot;&gt;6&lt;/span&gt;--&lt;span style=&quot;color: #000000;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #660033;&quot;&gt;-d&lt;/span&gt; developer&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;examples contributions&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;modules&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;examples&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Gedaan? Goed zo, dan gaan we weer verder...&lt;/p&gt;
&lt;h4&gt;Is je iets opgevallen?&lt;/h4&gt;
&lt;p&gt;Als je de documentatie die de vorige keer gemaakt is hebt gebruikt, ben je misschien wat vervelende problemen tegen gekomen. We slaan de kapotte links op de hoofdpagina nu nog even over. Eerst gaan we ontbrekende tekst corrigeren. Kijk maar eens naar de documentatie van de &lt;a href=&quot;http://api.drupal.org/api/function/t&quot;&gt;t()&lt;/a&gt; functie (in &lt;em&gt;includes/common.inc&lt;/em&gt;). Je kunt zien wat er mis is in de volgende screenshot:&lt;/p&gt;
&lt;div class=&quot;center&quot;&gt;
&lt;a href=&quot;http://nl.simply-life.net/cheetah/system/files/brokendoc1.png&quot; title=&quot;Kapotte Documentatie&quot; rel=&quot;lightshow[fixingdoc]&quot;&gt;&lt;img src=&quot;http://nl.simply-life.net/cheetah/system/files/imagecache/thumbnail/brokendoc1.png&quot; alt=&quot;Kapotte Documentatie&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;Zie je hoe het stukje &lt;span class=&quot;geshifilter&quot;&gt;&lt;code class=&quot;text geshifilter-text&quot;&gt;@variable&lt;/code&gt;&lt;/span&gt; ontbreekt bij het tweede item, net als het &lt;span class=&quot;geshifilter&quot;&gt;&lt;code class=&quot;text geshifilter-text&quot;&gt;%&lt;/code&gt;&lt;/span&gt; teken voor &lt;span class=&quot;geshifilter&quot;&gt;&lt;code class=&quot;text geshifilter-text&quot;&gt;variable&lt;/code&gt;&lt;/span&gt; in het derde puntje? Een kijkje in de Doxygen fout-uitvoer leert ons dat Doxygen het &lt;span class=&quot;geshifilter&quot;&gt;&lt;code class=&quot;text geshifilter-text&quot;&gt;@variable&lt;/code&gt;&lt;/span&gt; commando niet kent. &lt;a href=&quot;http://www.stack.nl/~dimitri/doxygen/commands.html&quot;&gt;Doxygen commando&#039;s&lt;/a&gt; worden vooraf gegaan door een &#039;@&#039; of &#039;\&#039; in Doxygen, maar de Drupal API module (die gebruikt wordt voor &lt;a href=&quot;http://api.drupal.org&quot;&gt;api.drupal.org&lt;/a&gt;) negeert vrolijk alle onbekende commando&#039;s. Doxygen niet, wat hier problemen veroorzaakt. Met het &#039;%&#039; teken vertellen we Doxygen in principe dat we het woord &#039;variable&#039; niet automatisch willen linken. Ook hier doet de Drupal API module niks mee en deze print het vrolijk uit.&lt;/p&gt;
&lt;p&gt;We gaan deze problemen in een paar stappen oplossen. Deel een: tijd voor wat PHP &lt;a href=&quot;http://www.php.net/manual/en/book.pcre.php&quot;&gt;Regular Expressions&lt;/a&gt; magie!&lt;/p&gt;
&lt;h4&gt;Een eenvoudige preprocessor&lt;/h4&gt;
&lt;p&gt;Maak een nieuw tekstbestand aan met een leuke naam als &lt;em&gt;perprocess-drupal-doxygen.php&lt;/em&gt;. Dat zegt ons precies wat het doet: Drupal bestanden preprocessen voor Doxygen; en het is een PHP script. Om te beginnen maken we alvast een basis klasse met behulp van de volgende code:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;geshifilter&quot;&gt;&lt;div class=&quot;php geshifilter-php&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;#!/usr/bin/php&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;?php&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;abstract &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;class&lt;/span&gt; Preprocessor &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$_filename&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: bold; font-style: italic;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; __construct &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$filename&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #000088;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;_filename &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$filename&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;  &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: bold; font-style: italic;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; process&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/file_get_contents&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;file_get_contents&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;_filename&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// Convert Mac/Win line breaks to Unix format.&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/str_replace&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;str_replace&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot;&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\r&lt;/span&gt;&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot;&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/str_replace&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;str_replace&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot;&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\r&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot;&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: bold; font-style: italic;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;doProcess&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;  &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;protected&lt;/span&gt; abstract &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; doProcess&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: bold; font-style: italic;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Opmerking: ik heb in de code hier (en verderop) het meeste commentaar uit de code gehaald; onderaan kun je het volledige script downloaden, met al het commentaar.&lt;/p&gt;
&lt;p&gt;Sla het bestand op en zorg de je &quot;uitvoer&quot; rechten hebt. Op Windows moet je misschien een bestands associatie als *.phpx instellen om te zorgen dat het door PHP uitgevoerd wordt, en het bestand vervolgens de juiste naam geven. Een andere optie is om een .cmd bestand te maken dat het PHP script uitvoert (en alle argumenten doorgeeft).&lt;/p&gt;
&lt;p&gt;De lap tekst doet een paar dingen. De eerste regel zorgt dat het script uitgevoerd wordt door PHP. Verder is er een &lt;em&gt;Preprocessor&lt;/em&gt; klasse, die een bestand leest en alle nieuwe regels naar een Unix formaat omzet, voor de eenvoudigheid (code geleend van de Drupal API module). Daarna roept het de (abstracte) &lt;em&gt;doProcess()&lt;/em&gt; functie aan. Hier werken we aan in twee subklasses (waarvan de tweede in deel 3B gemaakt zal worden). Deze gaan daadwerkelijk iets nuttigs doen.&lt;/p&gt;
&lt;p&gt;We voegen nu eerst de &lt;em&gt;CodePreprocessor&lt;/em&gt; klasse toe, die alle codebestanden (.php, .module, .inc etc.) zal verwerken. Om te beginnen gaan we commentaar eruit vissen:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;geshifilter&quot;&gt;&lt;div class=&quot;php geshifilter-php&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;class&lt;/span&gt; CodePreprocessor &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;extends&lt;/span&gt; Preprocessor &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; __construct &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$filename&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    Preprocessor&lt;span style=&quot;color: #339933;&quot;&gt;::&lt;/span&gt;__construct&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$filename&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: bold; font-style: italic;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;  &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;protected&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; doProcess&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// Beyond Drupal&#039;s API module: we also work on blocks started with &amp;quot;/*!&amp;quot;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/preg_replace_callback&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;preg_replace_callback&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;@/\*[\*!](.*?)\*/@s&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: bold; font-style: italic;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;                                      &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;processCommentBlock&#039;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;                                      &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// And those with at least two lines of /// or //!&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/preg_replace_callback&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;preg_replace_callback&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;@(//[/!])[^\\n]*\\n(\\1[^\\n]*\\n)+@s&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;                                      &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;processCommentBlock&#039;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: bold; font-style: italic;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;                                      &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// Return processed file contents&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;  &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: bold; font-style: italic;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; processCommentBlock&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$matches&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$matches&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// ADD FUNCTION CALLS HERE LATER&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: bold; font-style: italic;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;  &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;De &lt;em&gt;doProcess&lt;/em&gt; implementatie hier zoekt Doxygen commentaren op. In tegenstelling tot Drupal&#039;s API module, nemen we ook blokken mee die beginnen met &#039;/*!&#039;, net als blokken van tenminste twee regels beginnend met &#039;///&#039; of &#039;//!&#039;. Dit zijn allemaal blokken die Doxygen gaat doorlopen, dus wij doen hetzelfde. Op elk blok roepen we &lt;em&gt;processCommentBlock&lt;/em&gt; aan. Deze functie krijgt de matches array van de reguliere expressie (&lt;em&gt;$matches[0]&lt;/em&gt; bevat de gehele match), en verwacht een string retour. Vervolgens wordt het gevangen stuk tekst vervangen met deze waarde. Al met al een handige functie om onze verwerking in te zetten.&lt;/p&gt;
&lt;h4&gt;Onbekende commando&#039;s escapen&lt;/h4&gt;
&lt;p&gt;Nu wat echte verwerkingscode. Om Doxygen de &#039;@&#039; en &#039;%&#039; tekens te laten behouden in de uitvoer (om het eerste probleem op te lossen), moeten we ze escapen, oftewel een backslash ervoor zetten. We willen echter niet dat bestaande Doxygen commando&#039;s genegeerd worden. We kunnen tegelijkertijd ook een ander probleem oplossen: &lt;a href=&quot;http://api.drupal.org/api/function/drupal_match_path&quot;&gt;drupal_match_path()&lt;/a&gt; heeft documentatie met daarin &quot;\r&quot; en &quot;\n&quot;. Drupal&#039;s API module verwerkt het &quot;\n&quot; commando niet, terwijl Doxygen de regel afbreekt. Ook zeurt Doxygen dat het &quot;\r&quot; commando niet bestaat, en gooit het weg. We gaan dus ook commando&#039;s beginnend met een backslash escapen, net als (geldige!) backslash commando&#039;s gevolgd door een enkele letter (&lt;em&gt;\a&lt;/em&gt;, &lt;em&gt;\n&lt;/em&gt; enz), zo lang deze niet al ge-escaped zijn. Dus: &lt;em&gt;\r&lt;/em&gt; wordt &lt;em&gt;\\r&lt;/em&gt; (en weer &lt;em&gt;\r&lt;/em&gt; in de HTML uitvoer), maar iets als &lt;em&gt;\\e scaped&lt;/em&gt; blijft hetzelfde.&lt;/p&gt;
&lt;p&gt;Dus: tijd voor meer magie met reguliere expressies. Voeg een functie toe in de&lt;em&gt;CodePreprocessor&lt;/em&gt; class, die begint met het opnoemen van alle bekende Doxygen commando&#039;s:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;geshifilter&quot;&gt;&lt;div class=&quot;php geshifilter-php&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; escapeUnknownCommands&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    static &lt;span style=&quot;color: #000088;&quot;&gt;$commandsArray&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;a&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;addindex&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;addtogroup&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;anchor&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;arg&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;attention&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;author&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;b&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;brief&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;bug&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;c&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;callgraph&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;callgraph&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;callergraph&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;category&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;class&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;code&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;cond&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: bold; font-style: italic;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;copybrief&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;copydetails&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;copydoc&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;date&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;def&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;defgroup&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;deprecated&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;details&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;dir&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;dontinclude&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;dot&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;dotfile&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;e&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;else&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;elseif&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;em&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;endcode&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;endcond&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;enddot&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;endhtmlonly&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;endif&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;endlatexonly&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;endlink&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;endmanonly&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;endmsc&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;endverbatim&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;endxmlonly&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;enum&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;example&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;exception&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;extends&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;file&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;fn&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;headerfile&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;hideinitializer&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;htmlinclude&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;htmlonly&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;if&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;ifnot&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;image&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;implements&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;include&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;includelineno&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;ingroup&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;internal&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: bold; font-style: italic;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;invariant&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;interface&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;latexonly&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;li&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;line&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;link&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;mainpage&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;manonly&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;memberof&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;msc&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;n&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;name&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;namespace&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;nosubgrouping&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;note&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;overload&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;p&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;package&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;page&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;paragraph&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;param&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;post&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;pre&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;private&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;privatesection&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;property&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;protected&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;protectedsection&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;public&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;publicsection&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;protocol&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;ref&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;relates&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;relatesalso&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;remarks&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;return&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;retval&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;sa&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;section&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;see&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;showinitializer&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;since&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;skip&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;skipline&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;struct&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;subpage&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: bold; font-style: italic;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;subsection&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;subsubsection&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;test&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;throw&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;todo&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;tparam&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;typedef&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;union&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;until&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;var&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;verbatim&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;verbinclude&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;version&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;warning&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;weakgroup&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;xmlonly&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;xrefitem&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;annotatedclasslist&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;classhierarchy&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;define&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;functionindex&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;header&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;headerfilelist&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;inherit&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;l&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;postheader&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: bold; font-style: italic;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    static &lt;span style=&quot;color: #000088;&quot;&gt;$backslashCommandsArray&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;addindex&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;addtogroup&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;anchor&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;arg&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;attention&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;author&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;brief&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;bug&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;callgraph&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;callgraph&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;callergraph&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;category&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;class&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;code&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;cond&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;copybrief&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;copydetails&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;copydoc&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;date&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;def&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;defgroup&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;deprecated&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;details&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;dir&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;dontinclude&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;dot&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;dotfile&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;else&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;elseif&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;em&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;endcode&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;endcond&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;enddot&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: bold; font-style: italic;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;endhtmlonly&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;endif&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;endlatexonly&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;endlink&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;endmanonly&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;endmsc&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;endverbatim&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;endxmlonly&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;enum&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;example&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;exception&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;extends&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;file&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;fn&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;headerfile&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;hideinitializer&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;htmlinclude&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;htmlonly&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;if&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;ifnot&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;image&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;implements&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;include&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;includelineno&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;ingroup&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;internal&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;invariant&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;interface&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;latexonly&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;li&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;line&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;link&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;mainpage&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;manonly&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;memberof&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;msc&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;name&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;namespace&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;nosubgrouping&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;note&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;overload&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;package&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;page&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;paragraph&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: bold; font-style: italic;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;param&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;post&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;pre&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;private&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;privatesection&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;property&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;protected&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;protectedsection&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;public&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;publicsection&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;protocol&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;ref&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;relates&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;relatesalso&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;remarks&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;return&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;retval&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;sa&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;section&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;see&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;showinitializer&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;since&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;skip&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;skipline&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;struct&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;subpage&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;subsection&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;subsubsection&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;test&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;throw&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;todo&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;tparam&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;typedef&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;union&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;until&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;var&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;verbatim&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;verbinclude&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;version&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;warning&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;weakgroup&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;xmlonly&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;xrefitem&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: bold; font-style: italic;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;annotatedclasslist&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;classhierarchy&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;define&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;functionindex&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;header&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;headerfilelist&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;inherit&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;postheader&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    static &lt;span style=&quot;color: #000088;&quot;&gt;$noWordCommands&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;f[\$\[\]\{\}]&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;[\$@\\\\&amp;amp;~&amp;lt;&amp;gt;#%&amp;quot;]&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: bold; font-style: italic;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;  &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Nu gebruiken we deze lijsten om de belangrijkste reguliere expressies die we nodig hebben te maken: twee stuks om de commando&#039;s te escapen. Oh, en we vergeten ook niet om alle procent-tekens te escapen, als dat niet al gebeurt is. Tijd om de zojuist gemaakte functie uit te breiden:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;geshifilter&quot;&gt;&lt;div class=&quot;php geshifilter-php&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    static &lt;span style=&quot;color: #000088;&quot;&gt;$backslashCommandRegex&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #009900; font-weight: bold;&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    static &lt;span style=&quot;color: #000088;&quot;&gt;$commandsRegex&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #009900; font-weight: bold;&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    static &lt;span style=&quot;color: #000088;&quot;&gt;$noWordCommandsRegex&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #009900; font-weight: bold;&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: bold; font-style: italic;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/isset&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$backslashCommandRegex&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #000088;&quot;&gt;$commandsRegex&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;/(^|(?&amp;lt;=\W))(?&amp;lt;!\\\\|@)@(?!&#039;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;a href=&quot;http://www.php.net/implode&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;implode&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;\W|&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$commandsArray&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;\W|&#039;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;                     &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;a href=&quot;http://www.php.net/implode&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;implode&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;|&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$noWordCommands&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;)/&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #000088;&quot;&gt;$backslashCommandRegex&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;/(^|(?&amp;lt;=\W))(?&amp;lt;!\\\\|@)\\\\(?!&#039;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;                             &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;a href=&quot;http://www.php.net/implode&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;implode&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;\W|&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$backslashCommandsArray&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;\W|&#039;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: bold; font-style: italic;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;                             &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;a href=&quot;http://www.php.net/implode&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;implode&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;|&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$noWordCommands&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;)/&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// First replace all unknown backslash commands that occur before commands&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/preg_replace&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;preg_replace&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$backslashCommandRegex&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;\\\\\\\\&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: bold; font-style: italic;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// And unknown &#039;@&#039; prefixed commands&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/preg_replace&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;preg_replace&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$commandsRegex&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;\@&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// Escape all unescaped percentage characters&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/preg_replace&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;preg_replace&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;/(?&amp;lt;!\\\\|@)%/&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;\\\\%&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;De reguliere expressies zien er ingewikkeld uit (vooral omdat we zelf een hoop backslashes moeten escapen), maar de werking is zoals hierboven beschreven. De &#039;&lt;em&gt;noWordCommands&lt;/em&gt;&#039; is apart gehouden, omdat dan die commando&#039;s gevolgd met een letter intact blijven. Een normaal commando dat gevolgd wordt door extra letters, moet alsnog een backslash ervoor krijgen (bijvoorbeeld: &lt;em&gt;@var&lt;/em&gt; moet zo blijven, maar &lt;em&gt;@variable&lt;/em&gt; moet veranderen in &lt;em&gt;\@variable&lt;/em&gt;).&lt;/p&gt;
&lt;p&gt;Nu moeten we de nieuwe functie nog aanroepen. Plaats de volgende regel in de belangrijke &lt;em&gt;processCommentBlock()&lt;/em&gt; functie zoals eerder beschreven, bij de duidelijk gemarkeerde opmerking:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;geshifilter&quot;&gt;&lt;div class=&quot;php geshifilter-php&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;escapeUnknownCommands&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/p&gt;
&lt;h4&gt;Uitproberen&lt;/h4&gt;
&lt;p&gt;Voordat we de code kunnen gaan gebruiken, moet er nog een beetje toegevoegd worden om de preprocessor aan te sturen, onderaan het script (na alle klasses):&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;geshifilter&quot;&gt;&lt;div class=&quot;php geshifilter-php&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// Default to processing stdin if no arguments are given&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$argc&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;  &lt;span style=&quot;color: #000088;&quot;&gt;$argc&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;  &lt;span style=&quot;color: #000088;&quot;&gt;$argv&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;-&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: bold; font-style: italic;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// Process all files in argument list&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&lt;span style=&quot;color: #b1b100;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$i&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$i&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$argc&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;++&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$i&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;  &lt;span style=&quot;color: #000088;&quot;&gt;$filename&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$argv&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$i&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: bold; font-style: italic;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;  &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$filename&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #000088;&quot;&gt;$filename&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot;php://stdin&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;  &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: bold; font-style: italic;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;  &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// Find out type of file (based on filename)&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;  &lt;span style=&quot;color: #000088;&quot;&gt;$processor&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #009900; font-weight: bold;&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;  &lt;span style=&quot;color: #000088;&quot;&gt;$info&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/pathinfo&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;pathinfo&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$filename&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;  &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/empty&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;empty&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$info&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;extension&#039;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/in_array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;in_array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$info&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;extension&#039;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;html&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;htm&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;xhtml&#039;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// HTML Processing is for later...&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: bold; font-style: italic;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;  &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;  &lt;span style=&quot;color: #b1b100;&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #000088;&quot;&gt;$processor&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;new&lt;/span&gt; CodePreprocessor&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$filename&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;  &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: bold; font-style: italic;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;  &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// Process file&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;  &lt;span style=&quot;color: #b1b100;&quot;&gt;print&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$processor&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;process&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Deze code maakt een &lt;em&gt;CodePreprocessor&lt;/em&gt; instantie aan (later voegen we hier een apart item voor HTML bestanden aan toe). Alle bestanden die als argument mee worden gegeven, wordt de code verwerkt en de resultaten teruggestuurd. Standaard wordt er van de standaard input gelezen, om het script te kunnen hergebruiken buiten Doxygen, mocht dat ooit nodig zijn (&lt;em&gt;Dat was vooral handig tijdens het debuggen van het hele script, zodat ik het op selecties of andere bestanden kon gebruiken, direct vanuit mijn &lt;a href=&quot;http://www.kdevelop.org&quot;&gt;IDE&lt;/a&gt;&lt;/em&gt;).&lt;/p&gt;
&lt;p&gt;Laten we het script eens gaan uitproberen. Sla het op (ik gebruik hier &lt;em&gt;/home/cheetah/public_html/drupal.api/preprocess-drupal-doxygen.php&lt;/em&gt;) en open de Doxygen wizard weer eens (zoals in &lt;a href=&quot;http://nl.simply-life.net/cheetah/blog/2009-11-22/drupal-ontwikkeling-eenvoudiger-met-de-qt-assistant-deel-2&quot;&gt;deel twee&lt;/a&gt;). Verander de instelling &lt;strong&gt;INPUT_FILTER&lt;/strong&gt; in het &lt;strong&gt;Input&lt;/strong&gt; onderdeel zodat het naar je script wijst. Het is ook nuttig om de bestandsnaam toe te voegen aan de lijst van uitgesloten bestanden (voeg &lt;em&gt;preprocess-drupal-doxygen.php&lt;/em&gt; aan de &lt;strong&gt;EXCLUDE&lt;/strong&gt; instelling in het &lt;strong&gt;Input&lt;/strong&gt; onderdeel toe), mocht je het script in je Drupal directory opslaan. Hierdoor krijg je de documentatie van dit script niet in je Drupal documentatie.&lt;/p&gt;
&lt;div class=&quot;center&quot;&gt;
&lt;a href=&quot;http://nl.simply-life.net/cheetah/system/files/doxywizard4.png&quot; title=&quot;Doxywizard - INPUT_FILTER instelling&quot; rel=&quot;lightshow[fixingdoc]&quot;&gt;&lt;img src=&quot;http://nl.simply-life.net/cheetah/system/files/imagecache/thumbnail/doxywizard4.png&quot; alt=&quot;Doxywizard - INPUT_FILTER instelling&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://nl.simply-life.net/cheetah/system/files/doxywizard5.png&quot; title=&quot;Doxywizard - EXCLUDE instelling&quot; rel=&quot;lightshow[fixingdoc]&quot;&gt;&lt;img src=&quot;http://nl.simply-life.net/cheetah/system/files/imagecache/thumbnail/doxywizard5.png&quot; alt=&quot;Doxywizard - EXCLUDE instelling&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;Als je nu Doxygen uitvoert en de documentatie weer bekijkt, zul je zien of alles gelukt is. Zo ja, dan zou de documentatie van &lt;span class=&quot;geshifilter&quot;&gt;&lt;code class=&quot;text geshifilter-text&quot;&gt;t()&lt;/code&gt;&lt;/span&gt; er nu uit moeten zien zoals het &lt;a href=&quot;http://api.drupal.org/api/function/t&quot;&gt;online&lt;/a&gt; is. Mooi.&lt;/p&gt;
&lt;div class=&quot;center&quot;&gt;
&lt;a href=&quot;http://nl.simply-life.net/cheetah/system/files/fixeddoc1.png&quot; title=&quot;Gerepareerde Documentatie&quot; Documentatie=&quot;lightshow[fixingdoc]&quot;&gt;&lt;img src=&quot;http://nl.simply-life.net/cheetah/system/files/imagecache/thumbnail/fixeddoc1.png&quot; alt=&quot;Gerepareerde Documentation&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://nl.simply-life.net/cheetah/system/files/brokenfixeddoc1.png&quot; title=&quot;Kapotte en Gerepareerde Documentatie&quot; rel=&quot;lightshow[fixingdoc]&quot;&gt;&lt;img src=&quot;http://nl.simply-life.net/cheetah/system/files/imagecache/thumbnail/brokenfixeddoc1.png&quot; alt=&quot;Kapotte en Gerepareerde Documentatie&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;h4&gt;Kapotte links&lt;/h4&gt;
&lt;p&gt;Iets anders dat je direct al opvalt is dat op de hoofdpagina van de documentatie niet alle links werken. De links naar groepen (Module system, Database abstraction layer, enzovoorts) werken prima, net als de voorbeeldmodules als je die in je documentatie hebt staan. De links naar de constanten, globale variabelen en de geavanceerdere onderwerpen werken echter geen van allen. Tijd om dat ook op te lossen, door de preprocessor uit te breiden.&lt;/p&gt;
&lt;p&gt;We beginnen met de link naar alle constanten, of &lt;em&gt;enums&lt;/em&gt; in Doxygen. We weten dat er een pagina is, maar die staat niet op &lt;em&gt;/api/constants&lt;/em&gt;. We willen de &lt;em&gt;globals_enum.html&lt;/em&gt; pagina gebruiken; dat is de pagina met alle &lt;em&gt;define()&lt;/em&gt; elementen die in de code gevonden worden. Dus maken we er een normale anchor link van (oftewel een &amp;lt;a&amp;gt; tag):&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;geshifilter&quot;&gt;&lt;div class=&quot;php geshifilter-php&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; makeAnchorLinks&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$links&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #b1b100;&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$links&lt;/span&gt; &lt;span style=&quot;color: #b1b100;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$original&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$new&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #000088;&quot;&gt;$re&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;/@link &#039;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;a href=&quot;http://www.php.net/str_replace&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;str_replace&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;/&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;\/&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$original&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;(\/\S*)?\s(.*\S)\s*@endlink/&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/preg_replace&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;preg_replace&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$re&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;&amp;lt;a class=&amp;quot;el&amp;quot; href=&amp;quot;&#039;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$new&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;&amp;quot;&amp;gt;\\2&amp;lt;/a&amp;gt;&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: bold; font-style: italic;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;  &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;De volgende functie zal links naar &lt;em&gt;/api/globals&lt;/em&gt; gaan veranderen in een link die naar de &lt;em&gt;globals.php&lt;/em&gt; documentatie verwijst. Dit bestand, in de extra developer documentatie, bevat gedocumenteerde versies van alle globale variabelen in Drupal zelf. Een andere optie is om met bovenstaande functie de link naar &lt;em&gt;globals_vars.html&lt;/em&gt; te laten wijzen, waarin alle globale variabelen (ook die van modules) opgesomd worden. Als je daarvoor kiest is de volgende functie onnodig, tenzij je meer kapotte links vind die je wilt repareren.&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;geshifilter&quot;&gt;&lt;div class=&quot;php geshifilter-php&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; replaceLinks&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$links&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #b1b100;&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$links&lt;/span&gt; &lt;span style=&quot;color: #b1b100;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$original&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$new&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #000088;&quot;&gt;$re&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;/@link &#039;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;a href=&quot;http://www.php.net/str_replace&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;str_replace&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;/&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;\/&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$original&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;(\/\S*)?\s(.*\S)\s*@endlink/&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/preg_replace&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;preg_replace&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$re&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;@link &#039;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$new&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039; \\2 @endlink&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: bold; font-style: italic;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;  &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Zet beide functies in de &lt;em&gt;CodePreprocessor&lt;/em&gt; klasse. Roep ze als volgt aan, na de aanroep naar &lt;em&gt;escapeUnknownCommands&lt;/em&gt;:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;geshifilter&quot;&gt;&lt;div class=&quot;php geshifilter-php&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;makeAnchorLinks&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;        &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;/api/constants&#039;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;globals_enum.html&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;        &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// &#039;/api/globals&#039; =&amp;gt; &#039;globals_vars.html&#039;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: bold; font-style: italic;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;replaceLinks&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;        &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;/api/globals&#039;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;globals.php&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;      &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Zie je de regel commentaar? Dat is het alternatief voor de globale variabelen; verwijder of maak commentaar van de andere regel over &lt;em&gt;/api/globals&lt;/em&gt; als je liever de  &lt;em&gt;global_vars.html&lt;/em&gt; pagina gebruikt (je kunt daar hoe dan ook bij via Files, dan Globals in de Doxygen navigatie). Merk ook op dat de code flexibel genoeg is om snel meer links toe te voegen. Ook worden langere URLs automatisch meegenomen, zolang het extra deel met een slash begint (bijv. &lt;em&gt;/api/constants/7&lt;/em&gt; wordt ook in zijn geheel aangepast, maar &lt;em&gt;/api/constants_7&lt;/em&gt; wordt als andere link gezien).&lt;/p&gt;
&lt;p&gt;Nu nog de externe links (zoals de &quot;&lt;a href=&quot;http://drupal.org/node/547518&quot;&gt;Drupal Programming from an Object-Oriented Perspective&lt;/a&gt;&quot; link op de hoofdpagina). De volgende functie haalt het gebruikte &lt;span class=&quot;geshifilter&quot;&gt;&lt;code class=&quot;text geshifilter-text&quot;&gt;@link&lt;/code&gt;&lt;/span&gt; commando weg, en vervangt het met een HTML tag die door Doxygen verder met rust gelaten wordt.&lt;/p&gt;
&lt;p&gt;Now to deal with any external links (like the &quot;&lt;a href=&quot;http://drupal.org/node/547518&quot;&gt;Drupal Programming from an Object-Oriented Perspective&lt;/a&gt;&quot; link on the main page). The following function will remove the used &lt;span class=&quot;geshifilter&quot;&gt;&lt;code class=&quot;text geshifilter-text&quot;&gt;@link&lt;/code&gt;&lt;/span&gt; command, and replace it with an HTML tag again.&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;geshifilter&quot;&gt;&lt;div class=&quot;php geshifilter-php&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; replaceExternalLinks&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;    &lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; &lt;a href=&quot;http://www.php.net/preg_replace&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;preg_replace&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;/@link (([a-zA-Z]+:\/\/|mailto\:)\S*)\s+(.*\S)\s*@endlink/&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;                 &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;&amp;lt;a class=&amp;quot;el&amp;quot; href=&amp;quot;\\1&amp;quot;&amp;gt;\\3&amp;lt;/a&amp;gt;&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;  &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;En de aanroep:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;geshifilter&quot;&gt;&lt;div class=&quot;php geshifilter-php&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;pre style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;replaceExternalLinks&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$contents&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Let wel dat elk protocol (&lt;em&gt;http://&lt;/em&gt;, &lt;em&gt;ftp://&lt;/em&gt; enz) als extern gezien wordt. Het &lt;em&gt;mailto:&lt;/em&gt; protocol wordt enigszins apart afgheandeld, omdat er geen twee slashes achter komen, maar verder is alles gelijk. De hele URL, tot de eerste spatie, wordt gezien als de daadwerkelijke URL om naar te refereren. De rest is de tekst die gelinked wordt. Als je een stapje verder wilt gaan, kun je ook code toevoegen om de URL als gelinkte tekst te laten zien, als er verder geen tekst aanwezig is (Doxygen zal dat voor je doen als je de &lt;em&gt;@link&lt;/em&gt; en &lt;em&gt;@endlink&lt;/em&gt; commando&#039;s weg filtert). Dat laat ik verder als oefening open.&lt;/p&gt;
&lt;h4&gt;Samenvatting&lt;/h4&gt;
&lt;p&gt;Dus... wauw. Deze post is wat langer geworden dan ik had verwacht. Ik heb een vernieuwd Doxyfile in de bijlagen gezet (met de ingevulde &lt;strong&gt;INPUT_FILTER&lt;/strong&gt; en aangepaste &lt;strong&gt;EXCLUDE&lt;/strong&gt; instellingen), net als de code uit deze post. De grootste problemen in de Doxygen code zijn nu opgelost, waarmee de documentatie van Drupal meer geschikt wordt voor Doxygen zelf. Allemaal werk dat ook nuttig is als je de Qt Assistant niet gebruikt; zodra je Doxygen in plaats van Drupal&#039;s API module gebruikt, wil je de problemen die hier beschreven zijn opgelost hebben.&lt;/p&gt;
&lt;p&gt;Hierna volgt niet deel 4, maar 3b. De volgende stap is namelijk om te zorgen dat Doxygen de HTML pagina&#039;s met documentatie, zoals de Forms API referentie, gaat toevoegen. Dat zal sneller gaan nu we de basis klaar hebben.&lt;/p&gt;
&lt;table id=&quot;attachments&quot; class=&quot;sticky-enabled&quot;&gt;
 &lt;thead&gt;&lt;tr&gt;&lt;th&gt;Bijlage&lt;/th&gt;&lt;th&gt;Grootte&lt;/th&gt; &lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;
 &lt;tr class=&quot;odd&quot;&gt;&lt;td&gt;&lt;a href=&quot;http://nl.simply-life.net/cheetah/system/files/Doxyfile_0.&quot;&gt;Doxyfile.&lt;/a&gt;&lt;/td&gt;&lt;td&gt;62.95 KB&lt;/td&gt; &lt;/tr&gt;
 &lt;tr class=&quot;even&quot;&gt;&lt;td&gt;&lt;a href=&quot;http://nl.simply-life.net/cheetah/system/files/preprocess-drupal-doxygen.php_.txt&quot;&gt;preprocess-drupal-doxygen.php_.txt&lt;/a&gt;&lt;/td&gt;&lt;td&gt;9.55 KB&lt;/td&gt; &lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
</description>
 <comments>http://nl.simply-life.net/cheetah/blog/2010-07-27/drupal-ontwikkeling-eenvoudiger-met-de-qt-assistant-deel-3a#comments</comments>
 <category domain="http://nl.simply-life.net/cheetah/tag/drupal">Drupal</category>
 <category domain="http://nl.simply-life.net/cheetah/tag/open-source">Open Source</category>
 <category domain="http://nl.simply-life.net/cheetah/tag/qt">Qt</category>
 <enclosure url="http://nl.simply-life.net/cheetah/system/files/Doxyfile_0." length="64461" type="application/octet-stream" />
 <pubDate>Tue, 27 Jul 2010 09:20:11 +0000</pubDate>
 <dc:creator>ChEeTaH</dc:creator>
 <guid isPermaLink="false">69 at http://nl.simply-life.net/cheetah</guid>
</item>
<item>
 <title>MacDesperate nu Online!</title>
 <link>http://nl.simply-life.net/cheetah/blog/2009-12-08/macdesperate-nu-online</link>
 <description>&lt;p&gt;Na een behoorlijke tijd (meer dan een jaar), hebben we afgelopen zondag eindelijk MacDesperate gelanceerd. Wij zijn &lt;a href=&quot;http://www.rosana.nu/&quot; rel=&quot;nofollow&quot;&gt;Rosana&lt;/a&gt;, &lt;a href=&quot;http://alex.simsnetwork.com/&quot; rel=&quot;nofollow&quot;&gt;Alex&lt;/a&gt;, &lt;a href=&quot;http://www.myshuno.net/&quot; rel=&quot;nofollow&quot;&gt;Wouter&lt;/a&gt; en ik. Uiteraard draait MacDesperate op Drupal. Rosana en Wouter sparen voor Macs - zij zijn de echte MacDesperates - en mijn &lt;a href=&quot;http://nl.simply-life.net/cheetah/blog/2009-11-14/donation-goals-module-op-drupal&quot; rel=&quot;nofollow&quot;&gt;Donation Goals&lt;/a&gt; module helpt ze bij te houden hoeveel ze al hebben. De eerste donaties zijn al binnen. Nu is het tijd dat jij ze gaan steunen! Aarzel niet en ga naar &lt;a href=&quot;http://www.macdesperate.com&quot; rel=&quot;nofollow&quot;&gt;MacDesperate.com&lt;/a&gt;! We hebben goodies!&lt;/p&gt;
</description>
 <comments>http://nl.simply-life.net/cheetah/blog/2009-12-08/macdesperate-nu-online#comments</comments>
 <category domain="http://nl.simply-life.net/cheetah/tag/donation-goals">donation goals</category>
 <category domain="http://nl.simply-life.net/cheetah/tag/drupal">Drupal</category>
 <category domain="http://nl.simply-life.net/cheetah/tag/macdesperate">MacDesperate</category>
 <pubDate>Tue, 08 Dec 2009 18:59:05 +0000</pubDate>
 <dc:creator>ChEeTaH</dc:creator>
 <guid isPermaLink="false">67 at http://nl.simply-life.net/cheetah</guid>
</item>
<item>
 <title>Drupal Ontwikkeling eenvoudiger met de Qt Assistant - Deel 2</title>
 <link>http://nl.simply-life.net/cheetah/blog/2009-11-22/drupal-ontwikkeling-eenvoudiger-met-de-qt-assistant-deel-2</link>
 <description>&lt;!--break--&gt;&lt;!--break--&gt;&lt;p&gt;In het &lt;a href=&quot;http://nl.simply-life.net/cheetah/blog/2009-11-10/drupal-ontwikkeling-eenvoudiger-met-de-qt-assistant-deel-1&quot;&gt;vorige deel&lt;/a&gt; van deze walk-through hebben we de nodige software geïnstalleerd om de Drupal API documentatie in de Qt Assistant te krijgen. De volgende stap is om de Drupal documentatie te genereren zodat we er doorheen kunnen bladeren, zoeken en meer. Als je dat nog niet gedaan hebt, lees dan eerst &lt;a href=&quot;http://nl.simply-life.net/cheetah/blog/2009-11-10/drupal-ontwikkeling-eenvoudiger-met-de-qt-assistant-deel-1&quot;&gt;deel 1&lt;/a&gt; zodat je zeker weet dat je de goede software geïnstalleerd hebt.&lt;/p&gt;
&lt;h4&gt;Een Doxyfile Maken&lt;/h4&gt;
&lt;p&gt;Allereerst moeten we een configuratiebestand voor Doxygen maken. Dit bestand bevat instructies voor Doxygen over het formaat waarin de documentatie moet zijn, waar de code staat, enzovoorts. Ik zal laten zien hoe het werkt met het grafische programmaatje, &lt;span class=&quot;geshifilter&quot;&gt;&lt;code class=&quot;text geshifilter-text&quot;&gt;doxywizard&lt;/code&gt;&lt;/span&gt;. Natuurlijk is het ook mogelijk om het &lt;span class=&quot;geshifilter&quot;&gt;&lt;code class=&quot;text geshifilter-text&quot;&gt;doxygen&lt;/code&gt;&lt;/span&gt; commando een bestand aan te laten maken, dat je handmatig aanpast (met een tekstverwerker). Het maakt niet uit hoe je het doet. Als je het Doxyfile bestand direct wilt downloaden: dit staat onderaan deze post.&lt;/p&gt;
&lt;p&gt;Laten we beginnen met de Doxygen wizard. Deze staat in je applicatiemenu, waarschijnlijk onder Ontwikkeling (Development). Je kunt ook gewoon &lt;span class=&quot;geshifilter&quot;&gt;&lt;code class=&quot;text geshifilter-text&quot;&gt;doxywizard&lt;/code&gt;&lt;/span&gt; starten van een terminal. Het venster dat je te zien krijgt vraagt je, als eerst, om de werkdirectory te selecteren. Kies een Drupal directory hier. In mijn geval is dat &lt;em&gt;/home/cheetah/public_html/drupal.api&lt;/em&gt;. Aangezien we wat geavanceerde instellingen willen aanpassen, gaan we gelijk naar het &lt;em&gt;Expert&lt;/em&gt; tabblad om alles te configureren.&lt;/p&gt;
&lt;p&gt;De eerste instellingen waar je op moet letten zijn de &lt;strong&gt;PROJECT_NAME&lt;/strong&gt; (&quot;&lt;em&gt;drupal&lt;/em&gt;&quot;), &lt;strong&gt;PROJECT_NUMBER&lt;/strong&gt; (&quot;&lt;em&gt;6&lt;/em&gt;&quot; of welke versie van Drupal je ook mee werkt), en de &lt;strong&gt;OUTPUT_DIRECTORY&lt;/strong&gt; instellingen. Voor die laatste is het het makkelijkst om een nieuwe locatie op te geven waar Doxygen zijn bestanden wegschrijft. Hiermee voorkom je dat Doxygen bestanden je Drupal installatie volgooit met allerlei bestanden. Ik heb een &lt;em&gt;doxygen&lt;/em&gt; subdirectory gebruikt (&quot;&lt;em&gt;/home/cheetah/public_html/drupal.api/doxygen&lt;/em&gt;&quot;). Je kunt het best ook de &lt;strong&gt;REPEAT_BRIEF&lt;/strong&gt; en &lt;strong&gt;ALWAYS_DETAILED_SEC&lt;/strong&gt; opties inschakelen. De &lt;strong&gt;STRIP_FROM_PATH&lt;/strong&gt; zou nu leeg moeten zijn, maar het is wel zo handig om de hoofddirectory van je Drupal installatie hier in te vullen (op deze manier, als je Doxygen niet vanuit de Drupal directory start, haalt hij nog steeds het juiste pad van de bestandsnamen af). Ik heb ook de &lt;strong&gt;QT_AUTOBRIEF&lt;/strong&gt; en &lt;strong&gt;OPTIMIZE_OUTPUT_FOR_C&lt;/strong&gt; opties ingeschakeld.&lt;/p&gt;
&lt;p&gt;Als laatste is er nog één belangrijke instelling op het &lt;strong&gt;Project&lt;/strong&gt; topic, en dat is &lt;strong&gt;EXTENSION_MAPPING&lt;/strong&gt;. Normaal gesproken gebruikt Drupal &lt;em&gt;*.php&lt;/em&gt;, &lt;em&gt;*.module&lt;/em&gt; en &lt;em&gt;*.inc&lt;/em&gt; bestanden voor de code. We moeten Doxygen wel vertellen dat dit PHP bestanden zijn. Voeg &quot;&lt;em&gt;module=PHP&lt;/em&gt;&quot; en &quot;&lt;em&gt;install=PHP&lt;/em&gt;&quot; toe aan deze instelling (volgens de documentatie moet je de punt vooraan in de extensie weglaten).&lt;/p&gt;
&lt;div class=&quot;center&quot;&gt;
&lt;a href=&quot;http://nl.simply-life.net/cheetah/system/files/doxywizard1.png&quot; title=&quot;DoxyWizard - Project Instellingen&quot; rel=&quot;lightshow[doxywizard]&quot;&gt;&lt;img src=&quot;http://nl.simply-life.net/cheetah/system/files/imagecache/thumbnail/doxywizard1.png&quot; alt=&quot;DoxyWizard - Project Instellingen&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;Het volgende tabblad is het &lt;strong&gt;Build&lt;/strong&gt; topic. We willen alle documentatie krijgen, dus zetten wede &lt;strong&gt;EXTRACT&lt;/strong&gt; opties aan voor &lt;strong&gt;ALL&lt;/strong&gt;, &lt;strong&gt;PRIVATE&lt;/strong&gt;, &lt;strong&gt;STATIC&lt;/strong&gt;, &lt;strong&gt;LOCAL_CLASSES&lt;/strong&gt; en &lt;strong&gt;LOCAL_METHODS&lt;/strong&gt;. De &lt;strong&gt;SHOW_DIRECTORIES&lt;/strong&gt; instelling is handig als je de directorystructuur zichtbaar in de documentatie wilt hebben. We gaan gelijk verder naar &lt;strong&gt;Input&lt;/strong&gt;, waar we onze Drupal directory aan de &lt;strong&gt;INPUT&lt;/strong&gt; instelling toevoegen. Belangrijk is ook de &lt;strong&gt;FILE_PATTERNS&lt;/strong&gt; instelling: deze geeft aan Doxygen aan in welke bestanden documentatie staat. De bestanden &lt;em&gt;*.php&lt;/em&gt; en &lt;em&gt;*.inc&lt;/em&gt; staan er waarschijnlijk al, maar voor Drupal moet je hier ook de &lt;em&gt;*.module&lt;/em&gt; en &lt;em&gt;*.install&lt;/em&gt; patronene aan toevoegen. Hiermee zal Doxygen de meeste, zo niet alle, documentatie van Drupal code indexeren (helaas werkt Doxygen niet zo goed met Javascript).&lt;/p&gt;
&lt;p&gt;Schakel ook de &lt;strong&gt;RECURSIVE&lt;/strong&gt;  optie in, anders moet je Doxygen precies vertellen in welke directories er gezocht moet worden, in de &lt;strong&gt;INPUT&lt;/strong&gt; instelling. Als je een directory met backups van oude modules binnen je Drupal installatie bewaart, stel dan het pad in bij de &lt;strong&gt;EXCLUDE&lt;/strong&gt; instelling (bijvoorbeeld &quot;&lt;em&gt;backup&lt;/em&gt;&quot;). Voor &lt;strong&gt;EXCLUDE_PATTERNS&lt;/strong&gt; zijn de volgende patronen wellicht nuttig:  &lt;em&gt;*/CVS/*&lt;/em&gt;, &lt;em&gt;*/.svn/*&lt;/em&gt;, &lt;em&gt;*/.git/*&lt;/em&gt; (zodat Doxygen bestanden van versiebeheersystemen negeert), plus &lt;em&gt;*/settings.php&lt;/em&gt; en &lt;em&gt;*/*.settings.php&lt;/em&gt; om site-specifieke instellingbestanden te negeren.&lt;/p&gt;
&lt;div class=&quot;center&quot;&gt;
&lt;a href=&quot;http://nl.simply-life.net/cheetah/system/files/doxywizard2.png&quot; title=&quot;DoxyWizard - Input Instellingen&quot; rel=&quot;lightshow[doxywizard]&quot;&gt;&lt;img src=&quot;http://nl.simply-life.net/cheetah/system/files/imagecache/thumbnail/doxywizard2.png&quot; alt=&quot;DoxyWizard - Input Instellingen&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;De volgende stap is het &lt;strong&gt;HTML&lt;/strong&gt; topic, waarmee we de HTML uitvoer van Doxygen instellen. Ja, we willen HTML genereren (schakel &lt;strong&gt;GENERATE_HTML&lt;/strong&gt; in) in de &lt;em&gt;html&lt;/em&gt; subdirectory (&lt;strong&gt;HTML_OUTPUT&lt;/strong&gt;) met de &lt;em&gt;.html&lt;/em&gt; extensie voor de bestanden (&lt;strong&gt;HTML_FILE_EXTENSION&lt;/strong&gt;). Nu een heel belangrijke instelling voor het maken van Qt Help bestanden, die de Qt Assistant gebruikt. Schakel &lt;strong&gt;GENERATE_QHP&lt;/strong&gt; in. Voor &lt;strong&gt;QCH_FILE&lt;/strong&gt;, die net beschikbaar is gemaakt, stel je &lt;em&gt;drupal-6.qch&lt;/em&gt; in (of simpelweg &lt;em&gt;drupal.qch&lt;/em&gt;, of vervang de 6 door het versienummer van Drupal waar je mee werkt). Stel &lt;strong&gt;QHP_NAMESPACE&lt;/strong&gt; in op &lt;em&gt;org.drupal.6&lt;/em&gt; (vervang weer het versienummer) en stel &lt;em&gt;all&lt;/em&gt; in als de &lt;strong&gt;QHP_VIRTUAL_FOLDER&lt;/strong&gt; - dit komt later nog van pas. Dan nog de filter instellingen: Zet &lt;strong&gt;QHP_CUST_FILTER_NAME&lt;/strong&gt; op &lt;em&gt;&quot;Drupal 6 (all)&quot;&lt;/em&gt; en zowel &lt;strong&gt;QHP_CUST_FILTER_ATTRS&lt;/strong&gt; als &lt;strong&gt;QHP_SECT_FILTER_ATTRS&lt;/strong&gt; op &lt;em&gt;drupal drupal-6&lt;/em&gt;. Als laatste stellen we het pad naar het &quot;&lt;em&gt;qhelpgenerator&lt;/em&gt;&quot; programma (&quot;&lt;em&gt;qhelpgenerator.exe&lt;/em&gt;&quot; op Windows, neem ik aan) in met de &lt;strong&gt;QHG_LOCATION&lt;/strong&gt; instelling. Dit is waarschijnlijk iets als &quot;&lt;em&gt;/usr/bin/qhelpgenerator&lt;/em&gt;&quot; of &quot;&lt;em&gt;C:/Qt/bin/qhelpgenerator.exe&lt;/em&gt;&quot;. Laat de rest van de instellingen op hun standaardwaarde staan (&lt;strong&gt;DISABLE_INDEX&lt;/strong&gt; uit, &lt;strong&gt;GENERATE_TREEVIEW&lt;/strong&gt; op &lt;em&gt;none&lt;/em&gt;, enz.).&lt;/p&gt;
&lt;div class=&quot;center&quot;&gt;
&lt;a href=&quot;http://nl.simply-life.net/cheetah/system/files/doxywizard3.png&quot; title=&quot;DoxyWizard - HTML Settings&quot; rel=&quot;lightshow[doxywizard]&quot;&gt;&lt;img src=&quot;http://nl.simply-life.net/cheetah/system/files/imagecache/thumbnail/doxywizard3.png&quot; alt=&quot;DoxyWizard - HTML Settings&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;Controleer uiteindelijk nog even dat de uitvoer van &lt;strong&gt;LaTeX&lt;/strong&gt;, &lt;strong&gt;RTF&lt;/strong&gt;, &lt;strong&gt;Man&lt;/strong&gt; en &lt;strong&gt;XML&lt;/strong&gt; uit staan op de topics daarvoor. We gebruiken deze toch niet. Als je wilt kun je ook nog de klassediagrammen aan of uitschakelen op het &lt;strong&gt;Dot&lt;/strong&gt; topic. Dit zal voor sommige modules (met name Views) verschil maken.&lt;/p&gt;
&lt;h4&gt;Eerste Keer Starten&lt;/h4&gt;
&lt;p&gt;Alles is nu ingesteld, tijd om Doxygen te draaien! Ga naar het &lt;strong&gt;Run&lt;/strong&gt; tabblad, klik op de &lt;strong&gt;Run doxygen&lt;/strong&gt; knop en laat het z&#039;n werk doen. Als het eenmaal klaar is, klik je op  &quot;&lt;strong&gt;Show HTML Output&lt;/strong&gt;&quot; en je browser start met de Drupal documentatie recht voor je. Tenzij je de &quot;&lt;em&gt;sites&lt;/em&gt;&quot; subdirectory hebt weggelaten, krijg je ook de documentatie van contributed modules mee. Sommige links zullen niet werken (bijvoorbeeld de Form API referentie), en het geheel is misschien wat onoverzichtelijk als je veel modules erbij hebt. Dat lossen we in het volgende deel op. Eerst sluiten we de wizard af. Hij vraagt om de configuratie op te slaan. Doe dit met de standaard naam (&quot;&lt;em&gt;/home/cheetah/public_html/drupal.api/doxygen/Doxyfile&lt;/em&gt;&quot; in mijn geval). Het voorbeeldbestand dat hier gemaakt is vind je onderaan deze post.&lt;/p&gt;
&lt;div class=&quot;center&quot;&gt;
&lt;a href=&quot;http://nl.simply-life.net/cheetah/system/files/documentation1.png&quot; title=&quot;Drupal Documentation&quot; rel=&quot;lightshow[doxywizard]&quot;&gt;&lt;img src=&quot;http://nl.simply-life.net/cheetah/system/files/imagecache/thumbnail/documentation1.png&quot; alt=&quot;Drupal Documentation&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;Als laatste voor vandaag gaan we zorgen dat de Qt Assistant onze documentatie gaat laten zien. Dit vereist enig werk op de terminal/command line. Zorg eerst dat je weet waar Qt Assistant staat. Het programma heet simpelweg  &lt;span class=&quot;geshifilter&quot;&gt;&lt;code class=&quot;text geshifilter-text&quot;&gt;assistant&lt;/code&gt;&lt;/span&gt;, dus op de meeste platforms moet je het nu met &lt;span class=&quot;geshifilter&quot;&gt;&lt;code class=&quot;text geshifilter-text&quot;&gt;which assistant&lt;/code&gt;&lt;/span&gt; kunnen vinden. Op Windows kijk je in je Qt installatiedirectory, in de &lt;em&gt;bin&lt;/em&gt; directory. Kies nu een bestandsnaam voor je Qt Help Collectie, en maak een leeg bestand aan met deze naam. Dit kan met het &lt;span class=&quot;geshifilter&quot;&gt;&lt;code class=&quot;text geshifilter-text&quot;&gt;touch&lt;/code&gt;&lt;/span&gt; commando, of door met je bestandsbeheerder een leeg bestand met de juiste naam aan te maken (Windows gebruikers willen dat waarschijnlijk doen; gebruik de Verkenner of Kladblok en maak dat bestand aan. Zorg wel dat de extensie &lt;em&gt;.qhc&lt;/em&gt; en niet &lt;em&gt;.txt&lt;/em&gt; of iets anders is!). Start nu je terminal en voer het volgende commando uit (uitgaande van een bestandsnaam van &lt;em&gt;drupal-6.qhc&lt;/em&gt; in je home directory, en een username van &lt;em&gt;cheetah&lt;/em&gt;):&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;geshifilter&quot;&gt;&lt;code class=&quot;text geshifilter-text&quot;&gt;/usr/bin/assistant -collectionFile /home/cheetah/drupal-6.qhc&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Je kunt ook een snelkoppeling maken die dit uitvoert, natuurlijk. Je krijgt nu een lege Qt Assistant te zien:&lt;/p&gt;
&lt;div class=&quot;center&quot;&gt;
&lt;a href=&quot;http://nl.simply-life.net/cheetah/system/files/qtassistant4.png&quot; title=&quot;Lege Assistant&quot; rel=&quot;lightshow[drupalassistant]&quot;&gt;&lt;img src=&quot;http://nl.simply-life.net/cheetah/system/files/imagecache/thumbnail/qtassistant4.png&quot; alt=&quot;Lege Assistant&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;Zolang het de eerste keer is dat je de assistent met dit bestand opstart, kun je naar het &lt;em&gt;Edit&lt;/em&gt; &amp;gt; &lt;em&gt;Preferences&lt;/em&gt; menu gaan. Kies hier het &lt;em&gt;Documentation&lt;/em&gt; tabblad, klik &lt;em&gt;Add...&lt;/em&gt; en voeg het &lt;em&gt;drupal-6.qch&lt;/em&gt; bestand toe dat door Doxygen is gemaakt (dit staat in de &lt;em&gt;doxygen/html&lt;/em&gt; directory in je Drupal installatie, als je deze tutorial hebt gevolgd. Qt Assistant werkt nu de index bij, en je kunt je documentatie nu zien en doorzoeken:&lt;/p&gt;
&lt;div class=&quot;center&quot;&gt;
&lt;a href=&quot;http://nl.simply-life.net/cheetah/system/files/qtassistant5.png&quot; title=&quot;Adding Collections to the Assistant&quot; rel=&quot;lightshow[drupalassistant]&quot;&gt;&lt;img src=&quot;http://nl.simply-life.net/cheetah/system/files/imagecache/thumbnail/qtassistant5.png&quot; alt=&quot;Adding Collections to the Assistant&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;http://nl.simply-life.net/cheetah/system/files/qtassistant6.png&quot; title=&quot;Drupal Documentation in Assistant&quot; rel=&quot;lightshow[drupalassistant]&quot;&gt;&lt;img src=&quot;http://nl.simply-life.net/cheetah/system/files/imagecache/thumbnail/qtassistant6.png&quot; alt=&quot;Drupal Documentation in Assistant&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;Als je de assistant de volgende keer opstart met dezelfde collectionFile parameter, dan zal het &lt;em&gt;Documentation&lt;/em&gt; tabblad niet meer beschikbaar zijn onder de voorkeuren, zelfs na het verwijderen en opnieuw aanmaken van het bestand. Als dit gebeurt, kun je het helpbestand nog wel uit de collectie registreren en deregistreren, vanaf de opdrachtregel, als volgt (pas natuurlijk wel de bestandsnamen aan):&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;geshifilter&quot;&gt;&lt;code class=&quot;text geshifilter-text&quot;&gt;assistant -collectionFile drupal-6.qhc -register /home/cheetah/public_html/drupal.api/doxygen/html/drupal-6.qch&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Om het bestand weer uit de collectie te verwijderen:&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;geshifilter&quot;&gt;&lt;code class=&quot;text geshifilter-text&quot;&gt;assistant -collectionFile drupal-6.qhc -unregister /home/cheetah/public_html/drupal.api/doxygen/html/drupal-6.qch&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Deze commando&#039;s vertellen je of er iets nuttigs gebeurt is, maar ze starten de assistant niet op. Start hem opnieuw op met alleen het &lt;em&gt;collectionFile&lt;/em&gt; argument om de documentatie weer te zien.&lt;/p&gt;
&lt;p&gt;Let op dat zolang de Qt Compressed Help bestanden (die aangemaakt zijn door Doxygen) op dezelfde plek blijven staan, je de documentatie kunt bijwerken en de aanpassingen direct kunt zien in de assistant, als je ooit de documentatie bijwerkt. De assistant maakt automatisch zijn index opnieuw aan en regelt de rest voor jou. Met die kennis kun je dus een icoontje maken dat de assistant opstart, met directe toegang tot de Drupal documentatie. Gewoon bovenstaand commando gebruiken (dat van boven de lege assistant screenshot). Let op dat je de juiste bestandsnaam meegeeft!&lt;/p&gt;
&lt;h4&gt;Updates&lt;/h4&gt;
&lt;p&gt;Als je ooit je documentatie wilt bijwerken (omdat je bijvoorbeeld extra modules hebt geïnstalleerd, Drupal hebt bijgewerkt naar een nieuwe versie, enz), maak je de documentatie opnieuw aan met Doxygen. Je kunt met de wizard het eerder opgeslagen Doxyfile inladen, Doxygen opnieuw draaien, en de assistant toont de bijgewerkte documentatie als je het de volgende keer opstart. Zo simpel is het. Je kunt ook, met een terminal, naar je Drupal directory gaan (of waar je je Doxyfile dan ook hebt staan) en daar &lt;span class=&quot;geshifilter&quot;&gt;&lt;code class=&quot;text geshifilter-text&quot;&gt;doxygen&lt;/code&gt;&lt;/span&gt; aanroepen. Zolang je de &lt;strong&gt;INPUT&lt;/strong&gt; instelling hierboven expliciet hebt ingesteld, kun je ook &lt;span class=&quot;geshifilter&quot;&gt;&lt;code class=&quot;text geshifilter-text&quot;&gt;doxygen /pad/naar/Doxyfile&lt;/code&gt;&lt;/span&gt; gebruiken en zo zelfs een geheel andere bestandsnaam gebruiken voor je Doxygen configuratie. Je kunt natuurlijk ook wat met de instellingen van Doxygen spelen, het opnieuw draaien, en zo de documentatie met de nieuwe instellingen in je Qt Assistant krijgen.&lt;/p&gt;
&lt;p&gt;Natuurlijk hoef je ook geen apart collectiebestand (*.qhc) te gebruiken voor elke Drupal versie die je hebt. Je kunt elke versie van Drupal in dezelfde assistant zetten. Zolang je verschillende namespaces hebt gebruikt (vandaar dat de versienummers in de configuratie staan), kun je filteren op versie aan de bovenkant van de interface.&lt;/p&gt;
&lt;h4&gt;Samenvatting&lt;/h4&gt;
&lt;p&gt;De vorige keer hebben we alleen wat software geïnstalleerd. Deze keer hebben we die software allemaal gebruikt, al is het wel op de meest eenvoudige manier, maar met succes: de Qt Assistant laat nu de Drupal documentatie zien. Hiermee kun je al een heel eind op weg om alle informatie van de Drupal API die je nodig hebt te vinden. Er zijn nog wat problemen met niet werkende links naar speciale onderwerpen en je kunt nog niet filteren per module, enzovoorts.&lt;/p&gt;
&lt;p&gt;Maar: het belangrijkste zit er op. De volgende keer gaan we wat dieper in op die problemen, om deze op te lossen. Het wordt vast niet zo veel werk als dit deel. Tot de volgende keer!&lt;/p&gt;
&lt;table id=&quot;attachments&quot; class=&quot;sticky-enabled&quot;&gt;
 &lt;thead&gt;&lt;tr&gt;&lt;th&gt;Bijlage&lt;/th&gt;&lt;th&gt;Grootte&lt;/th&gt; &lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;
 &lt;tr class=&quot;odd&quot;&gt;&lt;td&gt;&lt;a href=&quot;http://nl.simply-life.net/cheetah/system/files/Doxyfile.&quot;&gt;Doxyfile.&lt;/a&gt;&lt;/td&gt;&lt;td&gt;62.83 KB&lt;/td&gt; &lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
</description>
 <comments>http://nl.simply-life.net/cheetah/blog/2009-11-22/drupal-ontwikkeling-eenvoudiger-met-de-qt-assistant-deel-2#comments</comments>
 <category domain="http://nl.simply-life.net/cheetah/tag/drupal">Drupal</category>
 <category domain="http://nl.simply-life.net/cheetah/tag/open-source">Open Source</category>
 <category domain="http://nl.simply-life.net/cheetah/tag/qt">Qt</category>
 <enclosure url="http://nl.simply-life.net/cheetah/system/files/Doxyfile." length="64337" type="application/octet-stream" />
 <pubDate>Sun, 22 Nov 2009 22:38:31 +0000</pubDate>
 <dc:creator>ChEeTaH</dc:creator>
 <guid isPermaLink="false">65 at http://nl.simply-life.net/cheetah</guid>
</item>
<item>
 <title>Donation Goals module op Drupal</title>
 <link>http://nl.simply-life.net/cheetah/blog/2009-11-14/donation-goals-module-op-drupal</link>
 <description>&lt;!--break--&gt;&lt;!--break--&gt;&lt;p&gt;Gisteren heb ik wat werk afgerond dat ik een een nieuwe Drupal module heb gestoken, voor een site die waarschijnlijk voor het eind van het jaar nog de lucht in gaat (ik wil geen druk op anderen zetten!). Het heet &quot;Donation Goals&quot; en kan van de &lt;a href=&quot;http://drupal.org/project/donation_goals&quot;&gt;Donation Goals Projectpagina&lt;/a&gt; gedownload worden.&lt;/p&gt;
&lt;p&gt;Met Donation Goals kun je een nieuw content type in je Drupal site maken. Je raadt &#039;t al, een &quot;Donation Goal.&quot; Even wat gegevens invullen, vooral hoeveel geld je nodig hebt. Dan de boel publiceren en zorgen dat je bezoekers krijgt. Ze kunnen dan geld doneren aan jou, via PayPal, zodat je zo je doel kunt bereiken.&lt;/p&gt;
&lt;p&gt;De module houdt de donaties bij (zolang ze via de site gemaakt worden) en maakt het zelfs mogelijk hippe overzichten van alle donaties te maken  (&lt;a href=&quot;http://drupal.org/project/views&quot;&gt;Views&lt;/a&gt; FTW!). Als je zelf wat geld gespaard hebt, kun je dit natuurlijk via PayPal toevoegen. Makkelijker is het om het geld gewoon toe te voegen aan de hoeveelheid gespaard geld en de module de rest van het werk laten doen (en daarmee omzeil je ook de PayPal kosten omdat je geld aan jezelf geeft).&lt;/p&gt;
&lt;p&gt;Er zijn een paar vergelijkbare modules (&lt;a href=&quot;http://drupal.org/project/bounty&quot;&gt;Bounty&lt;/a&gt;, &lt;a href=&quot;http://drupal.org/project/donation&quot;&gt;Donation&lt;/a&gt; and &lt;a href=&quot;http://drupal.org/project/chipin&quot;&gt;ChipIn&lt;/a&gt;) beschikbaar, maar ze zijn allemaal subtiel anders en/of worden niet meer bijgehouden.&lt;/p&gt;
&lt;p&gt;Een eerste ontwikkelversie is nu uit, maar de module heeft waarschijnlijk nog genoeg functionaliteit die toegevoegd kan worden, dingen om te veranderen en fouten om te repareren. Probeer hem alvast van &lt;a href=&quot;http://drupal.org/project/donation_goals&quot;&gt;drupal.org/project/donation_goals&lt;/a&gt; en laat me weten wat je er van vindt!&lt;/p&gt;
</description>
 <comments>http://nl.simply-life.net/cheetah/blog/2009-11-14/donation-goals-module-op-drupal#comments</comments>
 <category domain="http://nl.simply-life.net/cheetah/tag/donation-goals">donation goals</category>
 <category domain="http://nl.simply-life.net/cheetah/tag/drupal">Drupal</category>
 <category domain="http://nl.simply-life.net/cheetah/tag/open-source">Open Source</category>
 <pubDate>Sat, 14 Nov 2009 20:41:44 +0000</pubDate>
 <dc:creator>ChEeTaH</dc:creator>
 <guid isPermaLink="false">63 at http://nl.simply-life.net/cheetah</guid>
</item>
<item>
 <title>Drupal Ontwikkeling eenvoudiger met de Qt Assistant - Deel 1</title>
 <link>http://nl.simply-life.net/cheetah/blog/2009-11-10/drupal-ontwikkeling-eenvoudiger-met-de-qt-assistant-deel-1</link>
 <description>&lt;!--break--&gt;&lt;!--break--&gt;&lt;p&gt;Als je mijn blog ook maar enigszins volgt, weet je dat ik KDE 4 als desktop omgeving heb. Ik heb ook een hoop ontwikkeld (vooral wat aangeklooid tot nu toe, alleen tContact is gepubliceerd) voor Drupal. Een van de programma&#039;s die mij daarbij helpt is de Qt Assistant, die bij Qt 4 en later meegeleverd wordt. Het is een snel programma om documentatie te lezen, met een goede index om razendsnel die kleine details van elke functie in Qt 4 op te kunnen zoeken... of Drupal. Ik zal je laten zien hoe ik de boel heb aangepakt.&lt;/p&gt;
&lt;p&gt;Oh, als je niet zoveel hebt met al deze technische zooi: je hoeft niet verder te lezen, natuurlijk.&lt;/p&gt;
&lt;h4&gt;Opmerkingen vooraf&lt;/h4&gt;
&lt;p&gt;Ten eerste: deze gids gaat vooral over hoe de Drupal API in de Qt Assistant terecht komt, maar het zou voor zo&#039;n beetje elk C++/PHP/Java/Python project enz. moeten werken, zolang Doxygen er mee overweg kan. Zie de &lt;a href=&quot;http://www.stack.nl/~dimitri/doxygen/&quot;&gt;Doxygen website&lt;/a&gt; voor informatie hoe je je code moet documenteren enzovoorts. Helaas is het mij nog niet gelukt om de PHP documentatie zelf geïntegreerd te krijgen in de Qt Assistant.&lt;/p&gt;
&lt;p&gt;Ik gebruik soms ook wat scripts die vanuit een terminal of shell gedraaid moeten worden. Dit zou in principe geen probleem moeten zijn voor Linux of Mac gebruikers, voor Windows is het misschien nodig om &lt;a href=&quot;http://www.cygwin.com&quot;&gt;CygWin&lt;/a&gt; te gebruiken. Helaas heb ik dit alles niet in Windows geprobeerd, dus als iemand handige/bruikbare tips in de opmerkingen kan achterlaten voor Windows gebruikers, dan is dat zeer welkom.&lt;/p&gt;
&lt;h4&gt;Voorbereiding&lt;/h4&gt;
&lt;p&gt;Zo, je bent er nog. Het eerste wat er moet gebeuren is Qt4 installeren. Dat kun je downloaden van &lt;a href=&quot;http://www.qtsoftware.com&quot;&gt;QtSoftware.com&lt;/a&gt; voor zo&#039;n beetje elk platform. Gebruik de LGPL/Free versie van het Framework of SDK. Voor Linux gebruikers zit dit overigens vaak in de repositories van de distributie, je moet misschien wel de -dev of -devel pakketten installeren.&lt;/p&gt;
&lt;p&gt;Punt 2: download Drupal van &lt;a href=&quot;http://www.drupal.org&quot;&gt;Drupal.org&lt;/a&gt; en pak het ergens uit op je harde schijf. Je kunt natuurlijk ook je bestaande Drupal installatie met alle modules gebruiken, of welk product je dan ook wilt kunnen gebruiken met de Assistant (mits je de broncode hebt). Je kunt ook meerdere versies van Drupal gebruiken, om zo los van elkaar de documentatie van Drupal 5, 6 en 7 te hebben. De keuze is aan jou. Je hoeft &#039;t overigens niet te installeren, je hebt genoeg aan het beschikbaar maken van de broncode.&lt;/p&gt;
&lt;p&gt;Voor Drupal is het ook handig om de Ontwikkelaarsdocumentatie van CVS te halen. Hierin staan wat extra help pagina&#039;s zoals de FAPI Referentie en meer, en documentatie over alle &lt;em&gt;hooks&lt;/em&gt; (&lt;em&gt;hook_*&lt;/em&gt; functies). Ik zal de precieze instructies hier niet herhalen. Je vindt de &lt;a href=&quot;http://drupal.org/node/144223&quot;&gt;instructies namelijk op drupal.org&lt;/a&gt; (Engelstalig).&lt;/p&gt;
&lt;p&gt;Als laatste is het de beurt aan Doxygen (&lt;a href=&quot;http://www.stack.nl/~dimitri/doxygen/&quot;&gt;www.stack.nl/~dimitri/doxygen/&lt;/a&gt;). Linuxgebruikers vinden dit weer in de repository van de distributie. Dit programma leest de documentatie uit de broncode en zet deze in handige HTML bestanden - en uiteindelijk ook de Qt Assistant.&lt;/p&gt;
&lt;h4&gt;Qt Assistant - Een klein overzicht&lt;/h4&gt;
&lt;p&gt;Nu alle nodige software is geïnstalleerd, kun je even een kijkje nemen in wat de Qt Assistant precies doet voor Qt. Als het goed is vind je het in de programmastarter/start menu/waar dan ook (Mac: /Developer/Applications/Qt) of door gewoon &quot;&lt;em&gt;assistant&lt;/em&gt;&quot; vanuit een terminal. Probeer het maar, je zou iets moeten zien dat er ongeveer zo uit ziet:&lt;/p&gt;
&lt;div class=&quot;center&quot;&gt;
&lt;a href=&quot;http://www.simply-life.net/cheetah/system/files/qtassistant1.png&quot; title=&quot;Qt Assistant - Begin&quot; rel=&quot;lightshow[qtassistant]&quot;&gt;&lt;img src=&quot;http://www.simply-life.net/cheetah/system/files/imagecache/thumbnail/qtassistant1.png&quot; alt=&quot;Qt Assistant&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;Laten we even een functie opzoeken waarvan we een (deel van) de naam kennen: &lt;em&gt;aboutQt()&lt;/em&gt;. Klik op het &lt;em&gt;Index&lt;/em&gt; tabblad aan de linkerkant, vul &lt;em&gt;about&lt;/em&gt; in en je ziet een lijst van declaraties en algemene onderwerpen met &lt;em&gt;about&lt;/em&gt; in de naam. Dubbelklik op &lt;em&gt;aboutQt&lt;/em&gt; en de Qt Assistant vraagt je welk onderwerp je precies wilt bekijken, &lt;em&gt;QApplication&lt;/em&gt; of &lt;em&gt;QMessageBox&lt;/em&gt;. Ik heb gekozen voor &lt;em&gt;QApplication&lt;/em&gt; in de onderstaande screenshot. Daadwerkelijke documentatie!&lt;/p&gt;
&lt;div class=&quot;center&quot;&gt;
&lt;a href=&quot;http://www.simply-life.net/cheetah/system/files/qtassistant2.png&quot; title=&quot;Qt Assistant - Index Zoeken&quot; rel=&quot;lightshow[qtassistant]&quot;&gt;&lt;img src=&quot;http://www.simply-life.net/cheetah/system/files/imagecache/thumbnail/qtassistant2.png&quot; alt=&quot;Qt Assistant&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;Als laatste nog een functie die ik niet zo vaak gebruik, maar wel razendsnel is: de zoekfunctie. Je vindt dit tabblad aan de rechterkant, net boven je documentatie. Zoek naar &quot;&lt;em&gt;about&lt;/em&gt;&quot; en je krijgt iets wat lijkt op onderstaande screenshot, erg handig als je alleen een globaal onderwerp weet van iets wat je nodig hebt:&lt;/p&gt;
&lt;div class=&quot;center&quot;&gt;
&lt;a href=&quot;http://www.simply-life.net/cheetah/system/files/qtassistant3.png&quot; title=&quot;Qt Assistant - Volledige Tekst Zoeken&quot; rel=&quot;lightshow[qtassistant]&quot;&gt;&lt;img src=&quot;http://www.simply-life.net/cheetah/system/files/imagecache/thumbnail/qtassistant3.png&quot; alt=&quot;Qt Assistant&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;Speel wat rond en als je durft: probeer alvast de Drupal documentatie in de Assistant te krijgen. Dat zal in het volgende deel besproken worden - de gehele Drupal (en modules) API, geheel zonder het door de Qt documentatie te mixen.&lt;/p&gt;
</description>
 <comments>http://nl.simply-life.net/cheetah/blog/2009-11-10/drupal-ontwikkeling-eenvoudiger-met-de-qt-assistant-deel-1#comments</comments>
 <category domain="http://nl.simply-life.net/cheetah/tag/drupal">Drupal</category>
 <category domain="http://nl.simply-life.net/cheetah/tag/open-source">Open Source</category>
 <category domain="http://nl.simply-life.net/cheetah/tag/qt">Qt</category>
 <pubDate>Tue, 10 Nov 2009 22:53:44 +0000</pubDate>
 <dc:creator>ChEeTaH</dc:creator>
 <guid isPermaLink="false">61 at http://nl.simply-life.net/cheetah</guid>
</item>
<item>
 <title>Kijk! Onderhoud!</title>
 <link>http://nl.simply-life.net/cheetah/blog/2009-11-10/kijk-onderhoud</link>
 <description>&lt;p&gt;Hoera! Mijn lieftallige Rosana (&lt;a href=&quot;http://www.missdesign.nl&quot;&gt;MissDesign&lt;/a&gt;) heeft de site iets beter laten werken door wat aan het thema te sleutelen (HEEL erg bedankt, Rosana!). Dit was eigenlijk al een paar weken geleden gedaan. Ik heb net ook nog wat oude blogs gerepareerd zodat die er ook weer goed uit zien (screenshots e.d. moesten helaas even aangepast worden tijdens de updates, maar dat is nu opgelost). De verbeteringen zijn onder andere minder flikkeringen bij de knoppen bovenaan, opmerkingen hebben nu een betere stijl, en nog veel meer kleinere dingetjes. Ik heb net ook de Lightbox module aangezet op de site, waardoor afbeeldingen niet meer de hele website overnemen, maar in een mooie overlay te zien zijn. Ik heb zelfs slideshows! Ik beloof je, ik blog snel weer!&lt;/p&gt;
</description>
 <comments>http://nl.simply-life.net/cheetah/blog/2009-11-10/kijk-onderhoud#comments</comments>
 <category domain="http://nl.simply-life.net/cheetah/tag/rosana">Rosana</category>
 <category domain="http://nl.simply-life.net/cheetah/tag/simply-life">Simply Life</category>
 <pubDate>Tue, 10 Nov 2009 21:59:53 +0000</pubDate>
 <dc:creator>ChEeTaH</dc:creator>
 <guid isPermaLink="false">60 at http://nl.simply-life.net/cheetah</guid>
</item>
<item>
 <title>tContact op Drupal.org!</title>
 <link>http://nl.simply-life.net/cheetah/blog/2009-07-02/tcontact-op-drupalorg</link>
 <description>&lt;p&gt;Ik heb het er al eerder over gehad... maar vandaag is het dan eindelijk zo ver! Ik heb een week of twee geleden al een CVS account voor &lt;a href=&quot;http://www.drupal.org&quot;&gt;Drupal.org&lt;/a&gt; gekregen. Daar had ik alleen nog niet echt gebruik van gemaakt wegens tentamens, tot zonet. Heb je een Drupal site en wil je je contactformulieren vertaald krijgen? Ontmoet &lt;a href=&quot;http://drupal.org/project/tcontact&quot;&gt;tContact&lt;/a&gt;! Versie 6.x-1.0 is nu offici&amp;euml;el los!&lt;/p&gt;
</description>
 <comments>http://nl.simply-life.net/cheetah/blog/2009-07-02/tcontact-op-drupalorg#comments</comments>
 <category domain="http://nl.simply-life.net/cheetah/tag/drupal">Drupal</category>
 <category domain="http://nl.simply-life.net/cheetah/tag/open-source">Open Source</category>
 <category domain="http://nl.simply-life.net/cheetah/tag/tcontact">tContact</category>
 <pubDate>Thu, 02 Jul 2009 21:20:39 +0000</pubDate>
 <dc:creator>ChEeTaH</dc:creator>
 <guid isPermaLink="false">57 at http://nl.simply-life.net/cheetah</guid>
</item>
<item>
 <title>Bachelor Informatica Bijna Voltooid!</title>
 <link>http://nl.simply-life.net/cheetah/blog/2009-06-29/bachelor-informatica-bijna-voltooid</link>
 <description>&lt;p&gt;De afgelopen 2 weken heb ik tentamens gehad, waarvan &amp;eacute;&amp;eacute;n voor voor m&#039;n Bachelor Informatica. Ook het laatste voor die graad - nog een vak wat ik deze zomer (online) moet maken. Dit vak: &quot;Semantiek &amp;amp; Berekeningsmodellen.&quot; Het goede nieuws kwam vandaag: geslaagd. Score: 7. Dat betekent dat ik na de zomer m&#039;n Bachelor diploma waarschijnlijk heb. Woot! Natuurlijk een screenshot als bewijs:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.simply-life.net/cheetah/system/files/semantiek_7.png&quot;&gt;&lt;/a&gt;&lt;/p&gt;
</description>
 <comments>http://nl.simply-life.net/cheetah/blog/2009-06-29/bachelor-informatica-bijna-voltooid#comments</comments>
 <category domain="http://nl.simply-life.net/cheetah/tag/university">Universiteit</category>
 <pubDate>Mon, 29 Jun 2009 18:30:26 +0000</pubDate>
 <dc:creator>ChEeTaH</dc:creator>
 <guid isPermaLink="false">55 at http://nl.simply-life.net/cheetah</guid>
</item>
</channel>
</rss>

