<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Anis Berejeb</title>
	<atom:link href="http://www.berejeb.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.berejeb.com</link>
	<description>Actualites et nouveautes du developpement web, PHP, MySQL, HTTP, JavaScript, Performance</description>
	<lastBuildDate>Tue, 17 Aug 2010 16:22:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>jQuery Mobile : un framework pour les plateformes mobiles a la jQuery!</title>
		<link>http://www.berejeb.com/2010/08/jquery-mobile-un-framework-pour-les-plateformes-mobiles-a-la-jquery/</link>
		<comments>http://www.berejeb.com/2010/08/jquery-mobile-un-framework-pour-les-plateformes-mobiles-a-la-jquery/#comments</comments>
		<pubDate>Tue, 17 Aug 2010 16:22:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[JAVASCRIPT]]></category>
		<category><![CDATA[jqtouch jquery]]></category>
		<category><![CDATA[jquery mobile]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[mobile framework]]></category>

		<guid isPermaLink="false">http://www.berejeb.com/?p=1560</guid>
		<description><![CDATA[jQuery Mobile est un Framework pour les téléphones intelligents et les tablettes. Il présente une interface unifiée pour tous les plateformes mobiles populaires. Il implémente des évènements &#160;&#187;Touch&#160;&#187; et il est basé sur jQuery et jQuery UI. Il se veut flexible et facilement thematisable. Le framework supportera les layouts (listes, overlays etc) et un ensemble de contrôles et widgets (sliders, tabs etc.).  jQuery Mobile est en développement jusqu&#8217;a la fin de [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.berejeb.com/wp-content/uploads/2010/08/jquery-mobile.jpg"><img class="alignnone size-full wp-image-1561" title="jquery-mobile" src="http://www.berejeb.com/wp-content/uploads/2010/08/jquery-mobile.jpg" alt="" width="480" height="227" /></a></p>
<p><a title="jQuery Mobile" href="http://jquerymobile.com/" target="_blank">jQuery Mobile</a> est un Framework pour les téléphones intelligents et les tablettes. Il présente une interface unifiée pour tous les plateformes mobiles populaires. Il implémente des évènements &nbsp;&raquo;Touch&nbsp;&raquo; et il est basé sur jQuery et jQuery UI. Il se veut flexible et facilement thematisable. Le framework supportera les layouts (listes, overlays etc) et un ensemble de contrôles et widgets (sliders, tabs etc.).  <strong>jQuery Mobile est en développement jusqu&#8217;a la fin de 2010.</strong></p>

<!-- Wordpress Connect Modules v1.05 -->]]></content:encoded>
			<wfw:commentRss>http://www.berejeb.com/2010/08/jquery-mobile-un-framework-pour-les-plateformes-mobiles-a-la-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Comment Tester du code Legacy avec PHP_ChangeCoverage</title>
		<link>http://www.berejeb.com/2010/08/comment-tester-du-code-legacy-avec-php_changecoverage/</link>
		<comments>http://www.berejeb.com/2010/08/comment-tester-du-code-legacy-avec-php_changecoverage/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 03:03:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[legacy code]]></category>
		<category><![CDATA[PHP undercontrol]]></category>
		<category><![CDATA[PHPUnit]]></category>
		<category><![CDATA[PHP_ChangeCoverage]]></category>
		<category><![CDATA[qafoo]]></category>
		<category><![CDATA[tests unitaires]]></category>

		<guid isPermaLink="false">http://www.berejeb.com/?p=1555</guid>
		<description><![CDATA[Les gars de Qafoo viennent encore de sortir un nouveau né qui s&#8217;ajoute a l&#8217;arsenal des outils de PHP pour l&#8217;entreprise. Cette fois, cela concerne le Code Coverage. L&#8217;outil aide éventuellement a tester du code &#171;&#160;Legacy&#160;&#187;, chose qui présente un des gros problèmes pour ceux qui veulent faire des tests unitaires sur des projets open source comme Drupal, Joomla, PHPBB etc. Dans [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.berejeb.com/wp-content/uploads/2010/08/php-change-coverage.png"><img class="alignnone size-full wp-image-1556" title="php-change-coverage" src="http://www.berejeb.com/wp-content/uploads/2010/08/php-change-coverage.png" alt="" width="500" height="350" /></a></p>
<p>Les gars de <a href="http://qafoo.com" target="_blank">Qafoo</a> viennent encore de sortir un nouveau né qui s&#8217;ajoute a l&#8217;arsenal des outils de PHP pour l&#8217;entreprise. Cette fois, cela concerne le Code Coverage. L&#8217;outil aide éventuellement a tester du code &laquo;&nbsp;Legacy&nbsp;&raquo;, chose qui présente un des gros problèmes pour ceux qui veulent faire des tests unitaires sur des projets open source comme <em>Drupal</em>, <em>Joomla</em>, <em>PHPBB</em> etc.</p>
<p>Dans le blog post presentant l&#8217;outil, Qafoo présente une technique pour ce genre de tests sans trop se prendre la tête. L&#8217;outil s&#8217;appelle  <a href="http://github.com/manuelpichler/php-change-coverage" target="_blank">PHP_ChangeCoverage</a>.</p>
<p><strong><em>PHP_ChangeCoverage</em></strong> combine en effet les données collectées par  <a href="http://phpunit.de" target="_blank">PHPUnit</a> et l&#8217;historique des commits de votre système de gestion des versions et génère un rapport de coverage qui reflète juste les changements qui ont été faits sur les parties de l&#8217;applications qui ont été changées dans une période déterminée.</p>
<p>Plus d&#8217;informations sur l&#8217;installation et l&#8217;utilisation de l&#8217;outil sur  <a href="http://qafoo.com/blog/003_testing_legacy_code.html" target="_blank">Le Blog de Qafoo</a></p>

<!-- Wordpress Connect Modules v1.05 -->]]></content:encoded>
			<wfw:commentRss>http://www.berejeb.com/2010/08/comment-tester-du-code-legacy-avec-php_changecoverage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ORM Designer : Visual editor for PHP Doctrine, Doctrine2, Propel and CakePHP</title>
		<link>http://www.berejeb.com/2010/08/orm-designer-visual-editor-for-php-doctrine-doctrine2-propel-and-cakephp/</link>
		<comments>http://www.berejeb.com/2010/08/orm-designer-visual-editor-for-php-doctrine-doctrine2-propel-and-cakephp/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 13:25:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[cakephp]]></category>
		<category><![CDATA[doctrine]]></category>
		<category><![CDATA[doctrine2]]></category>
		<category><![CDATA[orm]]></category>
		<category><![CDATA[ormdesigner]]></category>
		<category><![CDATA[symfony]]></category>
		<category><![CDATA[visual orm editor]]></category>

		<guid isPermaLink="false">http://www.berejeb.com/?p=1552</guid>
		<description><![CDATA[Bonne nouvelle pour les développeurs Symfony et CakePHP! ORM Designer est un éditeur visuel pour construire des &#171;&#160;frameworks ORM&#160;&#187;. ORM Designer permet aux développeurs de concevoir visuellement les modèles d&#8217;application et par la suite de l&#8217;exporter en définitions natives de certains frameworks. Il supporte Doctrine, Doctrine2, Propel et Cake PHP. Plus d&#8217;infos sur le site officiel : http://www.orm-designer.com/]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.berejeb.com/wp-content/uploads/2010/08/ormdesigner.png"><img class="alignnone size-full wp-image-1553" title="ormdesigner" src="http://www.berejeb.com/wp-content/uploads/2010/08/ormdesigner.png" alt="" width="400" height="300" /></a></p>
<p>Bonne nouvelle pour les développeurs Symfony et CakePHP! <strong><em>ORM Designer</em></strong><em></em> est un éditeur visuel pour construire des &laquo;&nbsp;frameworks ORM&nbsp;&raquo;. ORM Designer permet aux développeurs de concevoir visuellement les modèles d&#8217;application et par la suite de l&#8217;exporter en définitions natives de certains frameworks. Il supporte Doctrine, Doctrine2, Propel et Cake PHP.</p>
<p>Plus d&#8217;infos sur le site officiel : <a href="http://www.orm-designer.com/" target="_blank">http://www.orm-designer.com/</a></p>

<!-- Wordpress Connect Modules v1.05 -->]]></content:encoded>
			<wfw:commentRss>http://www.berejeb.com/2010/08/orm-designer-visual-editor-for-php-doctrine-doctrine2-propel-and-cakephp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick tip : comment desactiver le demarrage automatique de Apache</title>
		<link>http://www.berejeb.com/2010/07/quick-tip-comment-desactiver-le-demarrage-automatique-de-apache/</link>
		<comments>http://www.berejeb.com/2010/07/quick-tip-comment-desactiver-le-demarrage-automatique-de-apache/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 18:36:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[APACHE]]></category>
		<category><![CDATA[desactiver apache]]></category>
		<category><![CDATA[sysv-rc-conf]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://www.berejeb.com/?p=1544</guid>
		<description><![CDATA[Si vous voulez stopper apache et faire que ca ne redemarera pas au redémarrage de votre systeme. Essayez  sysv-rc-conf . Un outil très sympa qui permet de gérer les services sur un shell. L&#8217;installation est simple : ?View Code SHELL1 sudo apt-get install sysv-rc-conf Lancez l&#8217;outil : ?View Code SHELL1 sudo sysv-rc-conf cela devrait vous donner un truc pareil : Le [...]]]></description>
			<content:encoded><![CDATA[<p>Si vous voulez stopper apache et faire que ca ne redemarera pas au redémarrage de votre systeme. Essayez  <em>sysv-rc-conf </em>. Un outil très sympa qui permet de gérer les services sur un shell.<br />
L&#8217;installation est simple :</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1544code3'); return false;">View Code</a> SHELL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p15443"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p1544code3"><pre class="shell" style="font-family:monospace;">sudo apt-get install sysv-rc-conf</pre></td></tr></table></div>

<p>Lancez l&#8217;outil :</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1544code4'); return false;">View Code</a> SHELL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p15444"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p1544code4"><pre class="shell" style="font-family:monospace;">sudo sysv-rc-conf</pre></td></tr></table></div>

<p>cela devrait vous donner un truc pareil :<br />
<a href="http://www.berejeb.com/wp-content/uploads/2010/07/sysrv-conf.png"><img class="alignnone size-full wp-image-1545" title="sysrv-conf" src="http://www.berejeb.com/wp-content/uploads/2010/07/sysrv-conf.png" alt="" width="500" height="284" /></a><br />
Le reste est simple! désactivez le service apache et sauvez.<br />
Cool n&#8217;est ce pas?</p>

<!-- Wordpress Connect Modules v1.05 -->]]></content:encoded>
			<wfw:commentRss>http://www.berejeb.com/2010/07/quick-tip-comment-desactiver-le-demarrage-automatique-de-apache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Autocomplete avec ZendX_JQuery et les fonctions anonymes de PHP5.3</title>
		<link>http://www.berejeb.com/2010/07/autocomplete-avec-zendx_jquery-et-les-fonctions-anonymes-de-php5-3/</link>
		<comments>http://www.berejeb.com/2010/07/autocomplete-avec-zendx_jquery-et-les-fonctions-anonymes-de-php5-3/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 15:20:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[JAVASCRIPT]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[autocomplete]]></category>
		<category><![CDATA[fonctions anonymes]]></category>
		<category><![CDATA[PHP5.3]]></category>
		<category><![CDATA[Zend framework]]></category>
		<category><![CDATA[ZendX_JQuery]]></category>

		<guid isPermaLink="false">http://www.berejeb.com/?p=1538</guid>
		<description><![CDATA[John Lebensold présente dans un screencast Comment intégrer facilement un composant autocomplete avec Zend Framework en utilisant ZendX_JQuery et une fonction anonyme de PHP5.3. // Plus de vidéos sur : http://www.zendcasts.com/]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.berejeb.com/wp-content/uploads/2010/07/zendx_jquery.png"><img class="alignnone size-full wp-image-1542" title="zendx_jquery" src="http://www.berejeb.com/wp-content/uploads/2010/07/zendx_jquery.png" alt="" width="600" height="274" /></a></p>
<p><em><strong>John Lebensold</strong></em> présente dans un screencast Comment intégrer facilement un composant autocomplete avec Zend Framework en utilisant ZendX_JQuery et une fonction anonyme de PHP5.3.<span id="more-1538"></span></p>
<p><object id="pod_video_1" style="visibility: visible;" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="600" height="400" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="flashvars" value="file=http%3A%2F%2Fzendcasts.com%2Fwp-content%2Fuploads%2F2010%2F07%2Fzc59-autocomplete-with-zendx-jquery-desktop.mov" /><param name="src" value="http://www.zendcasts.com/wp-content/plugins/podcasting/player/mediaplayer.swf" /><embed id="pod_video_1" style="visibility: visible;" type="application/x-shockwave-flash" width="600" height="400" src="http://www.zendcasts.com/wp-content/plugins/podcasting/player/mediaplayer.swf" flashvars="file=http%3A%2F%2Fzendcasts.com%2Fwp-content%2Fuploads%2F2010%2F07%2Fzc59-autocomplete-with-zendx-jquery-desktop.mov" allowscriptaccess="always" allowfullscreen="true"></embed></object><br />
<script type="text/javascript">// <![CDATA[
  			var pod_video_flashvars_1 = { file: "http%3A%2F%2Fzendcasts.com%2Fwp-content%2Fuploads%2F2010%2F07%2Fzc59-autocomplete-with-zendx-jquery-desktop.mov" }; 			var pod_video_params_1 = { allowfullscreen: "true", allowscriptaccess: "always" }; 			swfobject.embedSWF("http://www.zendcasts.com/wp-content/plugins/podcasting/player/mediaplayer.swf", "pod_video_1", "600", "400", "9.0.0", "", pod_video_flashvars_1, pod_video_params_1);
// ]]&gt;</script></p>
<p>Plus de vidéos sur : <a href="http://www.zendcasts.com/">http://www.zendcasts.com/</a></p>

<!-- Wordpress Connect Modules v1.05 -->]]></content:encoded>
			<wfw:commentRss>http://www.berejeb.com/2010/07/autocomplete-avec-zendx_jquery-et-les-fonctions-anonymes-de-php5-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHPillow : Manipulez facilement CouchDB avec PHP</title>
		<link>http://www.berejeb.com/2010/07/phpillow-manipulez-facilement-couchdb-avec-php/</link>
		<comments>http://www.berejeb.com/2010/07/phpillow-manipulez-facilement-couchdb-avec-php/#comments</comments>
		<pubDate>Mon, 26 Jul 2010 08:20:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[WEB]]></category>
		<category><![CDATA[couchdb]]></category>
		<category><![CDATA[php couchdb]]></category>
		<category><![CDATA[phpillow]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.berejeb.com/?p=1532</guid>
		<description><![CDATA[PHPillow est un client PHP orienté objet pour CouchDB. Le dernier release supporte les versions de PHP supérieures a 5.2. Le client bénéficie aussi de 96% de test coverage. PHPillow est un client leger qui dispose de contraintes de validation de document, une synchronisation automatique des vues ainsi qu&#8217;un versionning automatique de documents. Dans l&#8217;article suivant nous allons voir comment nous [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.berejeb.com/wp-content/uploads/2010/07/phpillow.png"><img class="alignnone size-full wp-image-1535" title="phpillow" src="http://www.berejeb.com/wp-content/uploads/2010/07/phpillow.png" alt="" width="228" height="200" /></a></p>
<p><strong><em>PHPillow</em></strong> est un client PHP orienté objet pour <strong><em>CouchDB</em></strong>. Le dernier release supporte les versions de PHP supérieures a 5.2. Le client bénéficie aussi de 96% de test coverage. PHPillow est un client leger qui dispose de contraintes de validation de document, une synchronisation automatique des vues ainsi qu&#8217;un versionning automatique de documents.<br />
Dans l&#8217;article suivant nous allons voir comment nous pouvons facilement manipuler CouchDB avec PHPillow.</p>
<h4>Connection a CouchDB</h4>
<p>Pour se connecter, utilisez la classe phpillowConnection. Exemple:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1532code14'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p153214"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p1532code14"><pre class="php" style="font-family:monospace;">phpillowConnection<span style="color: #339933;">::</span><span style="color: #004000;">createInstance</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'localhost'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">5984</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'user'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'password'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Une fois créée, cette connection va etre utilisée dans vos classes documents et vues automatiquement.</p>
<h4>Definir un document personnalisee</h4>
<p>Dans cet exemple, nous allons representer un article, qui peut avoir cette definition :</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1532code15'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p153215"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
</pre></td><td class="code" id="p1532code15"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> ArticleDocument <span style="color: #000000; font-weight: bold;">extends</span> phpillowDocument
<span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">protected</span> static <span style="color: #000088;">$type</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'article'</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000088;">$requiredProperties</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'title'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'abstract'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'author'</span>
    <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> __construct<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">properties</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span>
            <span style="color: #0000ff;">'title'</span>     <span style="color: #339933;">=&gt;</span> <span style="color: #000000; font-weight: bold;">new</span> phpillowStringValidator<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">'abstract'</span>      <span style="color: #339933;">=&gt;</span> <span style="color: #000000; font-weight: bold;">new</span> phpillowTextValidator<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">'author'</span>      <span style="color: #339933;">=&gt;</span> <span style="color: #000000; font-weight: bold;">new</span> phpillowStringValidator<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
        <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        parent<span style="color: #339933;">::</span>__construct<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000000; font-weight: bold;">function</span> generateId<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">stringToId</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">storage</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000000; font-weight: bold;">function</span> <a href="http://www.php.net/gettype"><span style="color: #990000;">getType</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$type</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>La propriété $type definit le type de document (article dans notre cas). Elle doit être unique dans toute l&#8217;application.<br />
Si vous n&#8217;êtes pas encore sous PHP 5.3, (qu&#8217;attendez vous pour migrer ? <img src='http://www.berejeb.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ), vous devez implémenter la methode getType() afin de retourner le type de votre document, sinon, le <a href="http://php.net/manual/en/language.oop5.late-static-bindings.php" target="_blank">late static binding</a> vous simplifiera la vie, vous pourrez alors implémenter cette methode dans votre classe de base.<br />
Le constructeur associe des validateurs aux propriétés de l&#8217;article qui sont déclarées dans la propriété $requiredProperties. PHPillow dispose de plusieurs types de validateurs comme <em>phpillowStringValidator</em> et <em>phpillowTextValidator</em>. Vous comprenez que vous pouvez eventuellement créer des validateurs personnalisées pour votre application par la suite.<br />
Le dernier truc que vous aurez besoin de faire est de générer un identifiant de document. la méthode <em>stringToId</em>() verifiera les requis de CouchDB pour un id de document comme l&#8217;unicité.</p>
<h4>Utiliser un document</h4>
<p>La création du document  se fait comme suit :</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1532code16'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p153216"><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code" id="p1532code16"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$doc</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> ArticleDocument<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$doc</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Mon premier article'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$doc</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">abstract</span>  <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Ceci est mon premier article'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$doc</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">author</span>  <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Anis Berejeb'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$doc</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">save</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>La méthode save() rendra disponible la propriété _id :</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1532code17'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p153217"><td class="line_numbers"><pre>1
2
</pre></td><td class="code" id="p1532code17"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">echo</span> <span style="color: #000088;">$doc</span><span style="color: #339933;">-&gt;</span>_id<span style="color: #339933;">;</span>
<span style="color: #339933;">&gt;</span> article<span style="color: #339933;">-</span>mon_premier_article</pre></td></tr></table></div>

<p>Pour récupérer un Article :</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1532code18'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p153218"><td class="line_numbers"><pre>1
2
</pre></td><td class="code" id="p1532code18"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$doc</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> ArticleDocument<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$doc</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">fetchById</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'article-mon_premier_article'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Les propriétés _id et _rev représentent respectivement l&#8217;identitfiant et la version courante  de l&#8217;article. L&#8217;ensemble des versions est aussi disponible dans un tableau :</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1532code19'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p153219"><td class="line_numbers"><pre>1
2
</pre></td><td class="code" id="p1532code19"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">echo</span> <span style="color: #000088;">$doc</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">revisions</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'title'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&gt;</span> Mon premier article</pre></td></tr></table></div>

<p>La propriété $versioned permet d&#8217;activer ou de désactiver le versionning d&#8217;un document.</p>
<h4>Les vues</h4>
<p>Dans CouchDB, les <a href="http://wiki.apache.org/couchdb/Introduction_to_CouchDB_views?action=show&amp;redirect=Views" target="_blank">vues</a> représentent un moyen d&#8217;accéder les documents par leurs propriétés ou par des clés complexes. Vous pouvez créer une vue en étendant la classe <em>phpillowView</em> comme suit :</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1532code20'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p153220"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
</pre></td><td class="code" id="p1532code20"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> ArticleView <span style="color: #000000; font-weight: bold;">extends</span> phpillowView
<span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000088;">$viewDefinitions</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span>
        <span style="color: #666666; font-style: italic;">// Indexer les articles par leur titre et afficher leur auteur</span>
        <span style="color: #0000ff;">'entries'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'function( doc )
{
    if ( doc.type == &quot;article&quot; )
    {
        emit( doc.title, doc._id );
&nbsp;
        emit( [doc._id, 0], doc._id );
&nbsp;
        if ( doc.author )
        {
                emit( [doc._id, 1], doc.author );
        }
    }
}'</span><span style="color: #339933;">,</span>
    <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000000; font-weight: bold;">function</span> getViewName<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">'vue_auteur'</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Les définitions de vues sont stockées dans la propriété <em>$viewDefinitions</em> et sont automatiquement écrits dans la base de données. Chaque vue a un nom. Dans la vue, Le code qui effectue l&#8217;indexation est écrit en <em><a href="http://fr.wikipedia.org/wiki/ECMAScript" target="_blank">EcmaScript</a></em>. La fonction emit() de CouchDB prend une clé et du contenu comme paramètres, elle indexe le contenu avec la clé donnée. Normalement, vous ne devez pas stocker des documents complets parce que les vues sont générées. Vous pourrez récupérer le document  via son titre comme suit :</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1532code21'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p153221"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p1532code21"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$doc</span> <span style="color: #339933;">=</span> ArticleView<span style="color: #339933;">::</span><span style="color: #004000;">entries</span><span style="color: #009900;">&#40;</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'key'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'Mon premier article'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<h4>Le gestionnaire</h4>
<p>Le gestionnaire phpillowManager est un point central pour manipuler vos documents :</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1532code22'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p153222"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code" id="p1532code22"><pre class="php" style="font-family:monospace;">phpillowManager<span style="color: #339933;">::</span><span style="color: #004000;">setDocumentClass</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'article'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'ArticleDocument'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$doc</span> <span style="color: #339933;">=</span> phpillowManager<span style="color: #339933;">::</span><span style="color: #004000;">createDocument</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'article'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// ...</span>
&nbsp;
<span style="color: #000088;">$doc</span> <span style="color: #339933;">=</span> phpillowManager<span style="color: #339933;">::</span><span style="color: #004000;">fetchDocument</span><span style="color: #009900;">&#40;</span>
    <span style="color: #0000ff;">'article'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'article-mon_premier_aricle'</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// ....</span></pre></td></tr></table></div>

<p>Plus d&#8217;informations, téléchargement et documentation sur</p>
<ul>
<li><a href="http://arbitracker.org/phpillow/" target="_blank">Phpillow</a></li>
<li><a href="http://couchdb.apache.org/" target="_blank">CouchDB</a></li>
</ul>

<!-- Wordpress Connect Modules v1.05 -->]]></content:encoded>
			<wfw:commentRss>http://www.berejeb.com/2010/07/phpillow-manipulez-facilement-couchdb-avec-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Commit Hooks : Facilite la gestion des pré/post commit</title>
		<link>http://www.berejeb.com/2010/07/php-commit-hooks-facilite-la-gestion-des-prepost-commit/</link>
		<comments>http://www.berejeb.com/2010/07/php-commit-hooks-facilite-la-gestion-des-prepost-commit/#comments</comments>
		<pubDate>Sat, 24 Jul 2010 22:48:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[php code sniffer]]></category>
		<category><![CDATA[php commit hook]]></category>
		<category><![CDATA[php depend]]></category>
		<category><![CDATA[php mess detector]]></category>
		<category><![CDATA[phpcs]]></category>
		<category><![CDATA[phpmd]]></category>
		<category><![CDATA[phpundercontrol]]></category>
		<category><![CDATA[post-commit]]></category>
		<category><![CDATA[pre-commit]]></category>
		<category><![CDATA[qafoo]]></category>

		<guid isPermaLink="false">http://www.berejeb.com/?p=1528</guid>
		<description><![CDATA[Encore une contribution qui facilite la vie! Qafoo, une startup récemment fondée par les createurs de phpUnderControl, phpMD et phpDepend, vient de rajouter un autre projet a sa liste de projets open source PHP Commit Hooks, un  framework facilite la création des pré et post commits. Dans PCH, vous aurez a gerer des Vérificateurs &#160;&#187;Checks&#160;&#187;  et des rapporteurs &#171;&#160;Reporters&#160;&#187;. Les vérificateurs vont implémenter par exemple des vérifications lint ou PHP_CodeSniffer. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.berejeb.com/wp-content/uploads/2010/07/php-os.png"><img class="alignnone size-full wp-image-1529" title="php-os" src="http://www.berejeb.com/wp-content/uploads/2010/07/php-os.png" alt="" width="200" height="200" /></a></p>
<p>Encore une contribution qui facilite la vie! <a href="http://qafoo.com" target="_blank">Qafoo</a>, une startup récemment fondée par les createurs de <a href="http://www.phpundercontrol.org" target="_blank">phpUnderControl</a>, <a href="http://phpmd.org" target="_blank">phpMD</a> et <a href="http://pdepend.org/" target="_blank">phpDepend</a>, vient de rajouter un autre projet a sa liste de projets open source<strong> PHP Commit Hooks, </strong>un  framework facilite la création des pré et post commits.</p>
<p>Dans PCH, vous aurez a gerer des Vérificateurs &nbsp;&raquo;Checks&nbsp;&raquo;  et des rapporteurs &laquo;&nbsp;Reporters&nbsp;&raquo;. Les vérificateurs vont implémenter par exemple des vérifications <a href="http://en.wikipedia.org/wiki/Lint_(software)" target="_blank">lint</a> ou <a href="http://pear.php.net/package/PHP_CodeSniffer" target="_blank">PHP_CodeSniffer</a>. Les rapporteurs quand a eux, vont rapporter ces changements a l&#8217;utilisateur. Vous pourrez par exemple envoyer des mails de commit, ce qui simplifiera l&#8217;implémentation de votre installation de hooks.</p>
<p>Voici un exemple de creation d&#8217;un pré-commit :</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1528code25'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p152825"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
</pre></td><td class="code" id="p1528code25"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">require</span> <a href="http://www.php.net/dirname"><span style="color: #990000;">dirname</span></a><span style="color: #009900;">&#40;</span> <span style="color: #009900; font-weight: bold;">__FILE__</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/../environment.php'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$runner</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> pchRunner<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$runner</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">register</span><span style="color: #009900;">&#40;</span> <span style="color: #000000; font-weight: bold;">new</span> pchLintCheck<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$runner</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">register</span><span style="color: #009900;">&#40;</span> <span style="color: #000000; font-weight: bold;">new</span> pchSvnKeywordsCheck<span style="color: #009900;">&#40;</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span>
    <span style="color: #0000ff;">'php'</span> <span style="color: #339933;">=&gt;</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'svn:keywords'</span> <span style="color: #339933;">=&gt;</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span>
            <span style="color: #0000ff;">'Revision'</span><span style="color: #339933;">,</span>
        <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
    <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$runner</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setReporter</span><span style="color: #009900;">&#40;</span> <span style="color: #000000; font-weight: bold;">new</span> pchReporterDispatcher<span style="color: #009900;">&#40;</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span>
    <span style="color: #000000; font-weight: bold;">new</span> pchCliReporter<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
    <span style="color: #000000; font-weight: bold;">new</span> pchExitCodeReporter<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$runner</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">run</span><span style="color: #009900;">&#40;</span> <span style="color: #000000; font-weight: bold;">new</span> pchRepositoryTransaction<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$argv</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$argv</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Dans cet exemple, nous enregistrons un Checker pour Lint  et un Checker pour les mots clés de Subversion (pchSvnKeywordsCheck).<br />
Si le hook de pré-commit se termine avec une valeur différente de zéro, SVN rejettera le code du commit et affichera le message reçu a l&#8217;utilisateur.  Le Reporter pchCliReporter va retourner donc ce message a SVN et le Reporter pchExitCodeReporter retournera un code différent de zéro dans le cas d&#8217;échec.</p>
<h4>Les post-commit</h4>
<p>Concernant les Post-commits, les hooks sont appelés d&#8217;une façon asynchrone afin de pouvoir exécuter des taches d&#8217;une longue durée, ils rapporteront les resultats par la suite par mail. voici un exemple :</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1528code26'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p152826"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
</pre></td><td class="code" id="p1528code26"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">require</span> <a href="http://www.php.net/dirname"><span style="color: #990000;">dirname</span></a><span style="color: #009900;">&#40;</span> <span style="color: #009900; font-weight: bold;">__FILE__</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/../environment.php'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$runner</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> pchRunner<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$runner</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">register</span><span style="color: #009900;">&#40;</span> <span style="color: #000000; font-weight: bold;">new</span> pchCodeSnifferCheck<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'Arbit'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$runner</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setReporter</span><span style="color: #009900;">&#40;</span> <span style="color: #000000; font-weight: bold;">new</span> pchReporterDispatcher<span style="color: #009900;">&#40;</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span>
    <span style="color: #000000; font-weight: bold;">new</span> pchMailReporter<span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'postcommit@example.org'</span><span style="color: #339933;">,</span> <span style="color: #666666; font-style: italic;">// Sender</span>
        <span style="color: #0000ff;">'{user}@example.org'</span><span style="color: #339933;">,</span>     <span style="color: #666666; font-style: italic;">// Receiver</span>
        <span style="color: #0000ff;">'Coding style violations'</span> <span style="color: #666666; font-style: italic;">// Mail topic</span>
    <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
    <span style="color: #000000; font-weight: bold;">new</span> pchCommitMailReporter<span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'{user}@example.org'</span><span style="color: #339933;">,</span>     <span style="color: #666666; font-style: italic;">// Sender</span>
        <span style="color: #0000ff;">'list@example.org'</span><span style="color: #339933;">,</span>       <span style="color: #666666; font-style: italic;">// Reciever</span>
        <span style="color: #0000ff;">'[SVN]'</span>                   <span style="color: #666666; font-style: italic;">// Subject prefix</span>
    <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$runner</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">run</span><span style="color: #009900;">&#40;</span> <span style="color: #000000; font-weight: bold;">new</span> pchRepositoryVersion<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$argv</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$argv</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Dans ce cas, on appelle un Checker PHP_CodeSniffer pour vérifier les fichiers nouvellement ajoutés, ou ceux modifiés. On enregistre deux rapporteurs, Un rapporteur de Mail qui enverra un mail au commiter ({user}@example.org), le second envoit le message a une mailing list.</p>
<p>Le projet est sous licence  <a href="http://www.opensource.org/licenses/bsd-license.html">New BSD</a> et il est disponible sur <a href="http://github.com/kore/php-commit-hooks">Github</a>.</p>

<!-- Wordpress Connect Modules v1.05 -->]]></content:encoded>
			<wfw:commentRss>http://www.berejeb.com/2010/07/php-commit-hooks-facilite-la-gestion-des-prepost-commit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sortie de PHP 5.3.3</title>
		<link>http://www.berejeb.com/2010/07/sortie-de-php-5-3-3/</link>
		<comments>http://www.berejeb.com/2010/07/sortie-de-php-5-3-3/#comments</comments>
		<pubDate>Thu, 22 Jul 2010 19:15:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[php 5.3.3]]></category>
		<category><![CDATA[php news]]></category>

		<guid isPermaLink="false">http://www.berejeb.com/?p=1524</guid>
		<description><![CDATA[La version 5.3.3 de PHP vient de sortir aujourd&#8217;hui. Le release contient plus de 100 fixes dont des corrections de sécurité. Les utilisateurs sont encouragés a upgrader vers cette version. La version 5.3.3 presente un changement incompatible avec les vieilles versions de PHP 5.3, ceci concerne le constructeur d&#8217;une classe namespacée. si vous avez un code legacy que [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.berejeb.com/wp-content/uploads/2010/07/php1.png"><img class="alignnone size-full wp-image-1526" title="php" src="http://www.berejeb.com/wp-content/uploads/2010/07/php1.png" alt="" width="200" height="200" /></a></p>
<p>La version 5.3.3 de PHP vient de sortir aujourd&#8217;hui. Le release contient plus de 100 fixes dont des corrections de sécurité. Les utilisateurs sont encouragés a upgrader vers cette version.<br />
La version 5.3.3 presente un changement incompatible avec les vieilles versions de PHP 5.3, ceci concerne le constructeur d&#8217;une classe namespacée. si vous avez un code legacy que vous voulez mettre a jour, faites attention a ce point. Par contre , ce changement ne concerne pas les migration de 5.2.x parce que les namespaces ont été introduits en PHP 5.3</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1524code28'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p152428"><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code" id="p1524code28"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">namespace</span> Foo<span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">class</span> Bar <span style="color: #009900;">&#123;</span>
   <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Bar<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">// traitée comme constructeur dans PHP 5.3.0 - PHP 5.3.2</span>
    <span style="color: #666666; font-style: italic;">// traitée comme une méthode régulière dans PHP 5.3.3</span>
    <span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<ul>
<li>Pour une liste complète des changements, visiter <a href="http://ca.php.net/ChangeLog-5.php#5.3.3" target="_blank">http://ca.php.net/ChangeLog-5.php#5.3.3</a></li>
<li>Si vous voulez migrer de PHP 5.2 vers ce release, visiter : <a href="http://php.net/migration53" target="_blank">http://php.net/migration53</a></li>
</ul>

<!-- Wordpress Connect Modules v1.05 -->]]></content:encoded>
			<wfw:commentRss>http://www.berejeb.com/2010/07/sortie-de-php-5-3-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sortie de PHP 5.2.14 : Fin du support des series 5.2</title>
		<link>http://www.berejeb.com/2010/07/sortie-de-php-5-2-14-fin-du-support-des-series-5-2/</link>
		<comments>http://www.berejeb.com/2010/07/sortie-de-php-5-2-14-fin-du-support-des-series-5-2/#comments</comments>
		<pubDate>Thu, 22 Jul 2010 19:11:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[php 5.2.14]]></category>
		<category><![CDATA[php news]]></category>

		<guid isPermaLink="false">http://www.berejeb.com/?p=1521</guid>
		<description><![CDATA[La version 5.2.14 de PHP vient de sortir. Des fixes de bugs ont ete effectuees, certaines sont reliées a des problèmes de sécurité. Cette version marque la fin du support de PHP 5.2. Ce qui veut dire les versions suivantes de 5.2.14 ne vont plus bénéficier de la maintenance de bugs. Des fixes de sécurité pourront etre appliqués au cas par cas. Tous les utilisateurs sont encouragés a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.berejeb.com/wp-content/uploads/2010/07/php.png"><img class="alignnone size-full wp-image-1522" title="php" src="http://www.berejeb.com/wp-content/uploads/2010/07/php.png" alt="" width="200" height="200" /></a></p>
<p>La version 5.2.14 de PHP vient de sortir. Des fixes de bugs ont ete effectuees, certaines sont reliées a des problèmes de sécurité. Cette version marque la fin du support de PHP 5.2. Ce qui veut dire les versions suivantes de 5.2.14 ne vont plus bénéficier de la maintenance de bugs.</p>
<p>Des fixes de sécurité pourront etre appliqués au cas par cas. Tous les utilisateurs sont encouragés a migrer vers PHP 5.3.</p>
<ul>
<li>Pour une liste complète de changements, visiter : <a href="http://ca.php.net/ChangeLog-5.php#5.2.14" target="_blank">http://ca.php.net/ChangeLog-5.php#5.2.14</a></li>
<li>Pour migrer a PHP5.3, un manuel est disponible sous :<a href="http://ca.php.net/migration53" target="_blank"> http://ca.php.net/migration53</a></li>
</ul>

<!-- Wordpress Connect Modules v1.05 -->]]></content:encoded>
			<wfw:commentRss>http://www.berejeb.com/2010/07/sortie-de-php-5-2-14-fin-du-support-des-series-5-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Aloha Editor : L&#8217;editeur Inline compatible HTML5</title>
		<link>http://www.berejeb.com/2010/07/aloha-editor-lediteur-inline-compatible-html5/</link>
		<comments>http://www.berejeb.com/2010/07/aloha-editor-lediteur-inline-compatible-html5/#comments</comments>
		<pubDate>Mon, 19 Jul 2010 22:49:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[JAVASCRIPT]]></category>
		<category><![CDATA[WEB]]></category>
		<category><![CDATA[aloha editor]]></category>
		<category><![CDATA[contenteditable]]></category>
		<category><![CDATA[floating menu]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[ice]]></category>
		<category><![CDATA[inline editition]]></category>

		<guid isPermaLink="false">http://www.berejeb.com/?p=1516</guid>
		<description><![CDATA[Aloha Editor est un éditeur HTML WYSIWYG compatible avec l&#8217;attribut contentEditable de HTML5. Il se plugue a n&#8217;importe quel contenu très facilement et permet l&#8217;édition &#160;&#187;Inline&#160;&#187;. Aloha produit un code compatible HTML5 et est très utile dans des fonctionnalités d&#8217;édition inline (Inline Content Edition ICE). Fonctionnalites Edition inline =&#62; Pas de popup, pas de reload, pas de besoinde faire un preview Menu flottant et léger Insertion [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.berejeb.com/wp-content/uploads/2010/07/aloha-editor.jpg"><img class="alignnone size-full wp-image-1517" title="aloha-editor" src="http://www.berejeb.com/wp-content/uploads/2010/07/aloha-editor.jpg" alt="" width="500" height="250" /></a></p>
<p><a href="http://aloha-editor.com/" target="_blank">Aloha Editor</a> est un éditeur HTML WYSIWYG compatible avec l&#8217;attribut <a href="http://www.w3.org/TR/html5/editing.html#contenteditable" target="_blank">contentEditable</a> de HTML5. Il se plugue a n&#8217;importe quel contenu très facilement et permet l&#8217;édition &nbsp;&raquo;Inline&nbsp;&raquo;. Aloha produit un code compatible HTML5 et est très utile dans des fonctionnalités d&#8217;édition inline (Inline Content Edition ICE).</p>
<h3>Fonctionnalites</h3>
<ul>
<li>Edition inline =&gt; Pas de popup, pas de reload, pas de besoinde faire un preview</li>
<li>Menu flottant et léger</li>
<li>Insertion de tables</li>
<li>Edition et formatage de texte sans balisage</li>
</ul>
<p>Le plugin est développé par  <strong><em>Gentics</em></strong> Software GmbH et est disponible a télécharger sous licence AGPLv3.</p>
<p>Plus d&#8217;informations, documentation, téléchargement et démonstrations sur le site officiel de <a href="http://aloha-editor.com/" target="_blank">Aloha Editor</a>.</p>

<!-- Wordpress Connect Modules v1.05 -->]]></content:encoded>
			<wfw:commentRss>http://www.berejeb.com/2010/07/aloha-editor-lediteur-inline-compatible-html5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
