<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Compléments pour les formations</title>
	<atom:link href="http://formatrice.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://formatrice.wordpress.com</link>
	<description>Symfony</description>
	<lastBuildDate>Tue, 30 Aug 2011 12:09:32 +0000</lastBuildDate>
	<language>fr</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='formatrice.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Compléments pour les formations</title>
		<link>http://formatrice.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://formatrice.wordpress.com/osd.xml" title="Compléments pour les formations" />
	<atom:link rel='hub' href='http://formatrice.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Mettre un commentaire dans son schema.yml</title>
		<link>http://formatrice.wordpress.com/2011/08/30/mettre-un-commentaire-dans-son-schema-yml/</link>
		<comments>http://formatrice.wordpress.com/2011/08/30/mettre-un-commentaire-dans-son-schema-yml/#comments</comments>
		<pubDate>Tue, 30 Aug 2011 12:09:31 +0000</pubDate>
		<dc:creator>Sarah Haïm-Lubczanski</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Symfony]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[schema]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[symfony]]></category>
		<category><![CDATA[yaml]]></category>

		<guid isPermaLink="false">http://formatrice.wordpress.com/?p=153</guid>
		<description><![CDATA[Comment ajouter un commentaire à une table, ou mieux, à un champ dans ma base de données, depuis mon schema.yml ? Avec la propriété &#8220;description&#8221; : article_id: {type: TINYINT, required: true, default: '0', description: 'référence à un article', FK: { type: INTEGER, required: true, foreignTable: article, foreignReference: id }' } Classé dans:PHP, Symfony Tagged: mysql, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=formatrice.wordpress.com&amp;blog=1935751&amp;post=153&amp;subd=formatrice&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Comment ajouter un commentaire à une table, ou mieux, à un champ dans ma base de données, depuis mon schema.yml ?</p>
<p>Avec la propriété &#8220;description&#8221; :</p>
<pre>article_id:
{type: TINYINT,
required: true,
default: '0',
description: 'référence à un article',
FK: { type: INTEGER, required: true, foreignTable: article, foreignReference: id }'
}</pre>
<br />Classé dans:<a href='http://formatrice.wordpress.com/category/php/'>PHP</a>, <a href='http://formatrice.wordpress.com/category/php/symfony-php/'>Symfony</a> Tagged: <a href='http://formatrice.wordpress.com/tag/mysql/'>mysql</a>, <a href='http://formatrice.wordpress.com/tag/schema/'>schema</a>, <a href='http://formatrice.wordpress.com/tag/sql/'>sql</a>, <a href='http://formatrice.wordpress.com/tag/symfony/'>symfony</a>, <a href='http://formatrice.wordpress.com/tag/yaml/'>yaml</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/formatrice.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/formatrice.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/formatrice.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/formatrice.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/formatrice.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/formatrice.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/formatrice.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/formatrice.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/formatrice.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/formatrice.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/formatrice.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/formatrice.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/formatrice.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/formatrice.wordpress.com/153/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=formatrice.wordpress.com&amp;blog=1935751&amp;post=153&amp;subd=formatrice&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://formatrice.wordpress.com/2011/08/30/mettre-un-commentaire-dans-son-schema-yml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">sarahhaim</media:title>
		</media:content>
	</item>
		<item>
		<title>PHP parse error: unexpected T_SL</title>
		<link>http://formatrice.wordpress.com/2010/03/02/php-parse-error-unexpected-t_sl/</link>
		<comments>http://formatrice.wordpress.com/2010/03/02/php-parse-error-unexpected-t_sl/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 16:01:38 +0000</pubDate>
		<dc:creator>Sarah Haïm-Lubczanski</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://formatrice.wordpress.com/?p=150</guid>
		<description><![CDATA[Dans l&#8217;erreur ci dessus : le T_SL signifie Trailing Spaces et l&#8217;erreur est provoquée par des espaces en trop après la fin de ligne. Classé dans:PHP<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=formatrice.wordpress.com&amp;blog=1935751&amp;post=150&amp;subd=formatrice&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Dans l&#8217;erreur ci dessus : le T_SL signifie Trailing Spaces et l&#8217;erreur est provoquée par des espaces en trop après la fin de ligne.</p>
<br />Classé dans:<a href='http://formatrice.wordpress.com/category/php/'>PHP</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/formatrice.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/formatrice.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/formatrice.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/formatrice.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/formatrice.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/formatrice.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/formatrice.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/formatrice.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/formatrice.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/formatrice.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/formatrice.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/formatrice.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/formatrice.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/formatrice.wordpress.com/150/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=formatrice.wordpress.com&amp;blog=1935751&amp;post=150&amp;subd=formatrice&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://formatrice.wordpress.com/2010/03/02/php-parse-error-unexpected-t_sl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">sarahhaim</media:title>
		</media:content>
	</item>
		<item>
		<title>Git : remettre en route un répertoire après l&#8217;avoir déplacé</title>
		<link>http://formatrice.wordpress.com/2010/02/19/git-remettre-en-route-un-repertoire-apres-lavoir-deplace/</link>
		<comments>http://formatrice.wordpress.com/2010/02/19/git-remettre-en-route-un-repertoire-apres-lavoir-deplace/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 11:59:14 +0000</pubDate>
		<dc:creator>Sarah Haïm-Lubczanski</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[versionning]]></category>

		<guid isPermaLink="false">http://formatrice.wordpress.com/?p=147</guid>
		<description><![CDATA[Après avoir copié et déplacé le répertoire sous version de mon projet, un simple git status m&#8217;informait que TOUS les fichiers avaient été modifiés. Pour revenir à un état stable (rien à commiter), il a fallu : Ajouter tous les fichiers au prochain commit Tout commiter, donc Utiliser le reset pour revenir à la version [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=formatrice.wordpress.com&amp;blog=1935751&amp;post=147&amp;subd=formatrice&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Après avoir copié et déplacé le répertoire sous version de mon projet, un simple</p>
<p>git status</p>
<p>m&#8217;informait que TOUS les fichiers avaient été modifiés.</p>
<p>Pour revenir à un état stable (rien à commiter), il a fallu :</p>
<ol>
<li>Ajouter tous les fichiers au prochain commit</li>
<li>Tout commiter, donc</li>
<li>Utiliser le reset pour revenir à la version du serveur central, en annulant le dernier commit</li>
</ol>
<p>La clef a été de tout commiter.</p>
<br />Classé dans:<a href='http://formatrice.wordpress.com/category/php/'>PHP</a> Tagged: <a href='http://formatrice.wordpress.com/tag/git/'>git</a>, <a href='http://formatrice.wordpress.com/tag/programming/'>programming</a>, <a href='http://formatrice.wordpress.com/tag/versionning/'>versionning</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/formatrice.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/formatrice.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/formatrice.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/formatrice.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/formatrice.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/formatrice.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/formatrice.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/formatrice.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/formatrice.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/formatrice.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/formatrice.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/formatrice.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/formatrice.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/formatrice.wordpress.com/147/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=formatrice.wordpress.com&amp;blog=1935751&amp;post=147&amp;subd=formatrice&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://formatrice.wordpress.com/2010/02/19/git-remettre-en-route-un-repertoire-apres-lavoir-deplace/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">sarahhaim</media:title>
		</media:content>
	</item>
		<item>
		<title>Doctrine vs Propel</title>
		<link>http://formatrice.wordpress.com/2009/11/30/doctrine-vs-propel/</link>
		<comments>http://formatrice.wordpress.com/2009/11/30/doctrine-vs-propel/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 09:11:52 +0000</pubDate>
		<dc:creator>Sarah Haïm-Lubczanski</dc:creator>
				<category><![CDATA[Outils]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Symfony]]></category>
		<category><![CDATA[Doctrine]]></category>
		<category><![CDATA[orm]]></category>
		<category><![CDATA[Propel]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://formatrice.wordpress.com/?p=142</guid>
		<description><![CDATA[Durant les formations Symfony, on me pose régulièrement la question : mais quel est le meilleur ORM, Propel ou Doctrine ? La réponse, mon ami, est soufflée dans le vent, La réponse est soufflée dans le vent. J&#8217;ai donc décidé de commencer ma réponse par les liens des gens qui en parlent : Passage de [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=formatrice.wordpress.com&amp;blog=1935751&amp;post=142&amp;subd=formatrice&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Durant les formations Symfony, on me pose régulièrement la question : mais quel est le meilleur ORM, Propel ou Doctrine ?</p>
<p>La réponse, mon ami, est soufflée dans le vent,<br />
La réponse est soufflée dans le vent.</p>
<p>J&#8217;ai donc décidé de commencer ma réponse par les liens des gens qui en parlent :</p>
<ul>
<li><a href="http://www.ze-technology.com/2009/11/29/passage-de-propel-a-doctrine-retour-dexperience/">Passage de Propel à Doctrine, retour d&#8217;XP</a> (Ze Technology)</li>
<li><a href="http://totalement.geek.oupas.fr/article/2009/02/14/symfony-bench-des-orm-propel-et-doctrine">Benchmark des deux ORM</a> (Totalement Geek)</li>
<li><a href="http://www.lafermeduweb.net/billet/symfony-quel-orm-choisir-propel-ou-doctrine-302.html">Quel ORM choisir ?</a> (La Ferme Du Web)</li>
</ul>
<p>Une petite <a href="http://www.google.fr/search?q=doctrine+propel">recherche Google</a> vous aidera pas mal aussi (et vous retrouverez ceux que je viens de vous citer).</p>
<p>Et comme il faut toujours aller chercher l&#8217;information à la source, je vous enjoins de lire l&#8217;article (d&#8217;il y a 6 mois déjà) du blog de Symfony Project : <a href="http://www.symfony-project.org/blog/2009/06/11/new-in-symfony-1-3-what-s-up-with-propel-and-doctrine">What&#8217;s up with Propel and Doctrine ?</a> (1.3)</p>
<br />Publié dans Outils, PHP, Symfony Tagged: Doctrine, orm, Propel, symfony <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/formatrice.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/formatrice.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/formatrice.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/formatrice.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/formatrice.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/formatrice.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/formatrice.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/formatrice.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/formatrice.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/formatrice.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/formatrice.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/formatrice.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/formatrice.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/formatrice.wordpress.com/142/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=formatrice.wordpress.com&amp;blog=1935751&amp;post=142&amp;subd=formatrice&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://formatrice.wordpress.com/2009/11/30/doctrine-vs-propel/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">sarahhaim</media:title>
		</media:content>
	</item>
		<item>
		<title>Fonctions de callback : objet possible</title>
		<link>http://formatrice.wordpress.com/2009/09/03/fonctions-de-callback-objet-possible/</link>
		<comments>http://formatrice.wordpress.com/2009/09/03/fonctions-de-callback-objet-possible/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 15:30:23 +0000</pubDate>
		<dc:creator>Sarah Haïm-Lubczanski</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://formatrice.wordpress.com/?p=123</guid>
		<description><![CDATA[Pour définir un gestionnaire d&#8217;erreurs personnalisé en PHP (il faut en avoir l&#8217;intérêt, car le système par défaut peut permettre déjà pas mal d&#8217;utilisations intéressantes), on utilise la fonction set_error_handler() dont voici la signature : mixed set_error_handler ( callback $error_handler [, int $error_types= E_ALL &#124; E_STRICT ] ) On remarque le callback en premier argument, j&#8217;ai [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=formatrice.wordpress.com&amp;blog=1935751&amp;post=123&amp;subd=formatrice&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Pour définir un gestionnaire d&#8217;erreurs personnalisé en PHP (il faut en avoir l&#8217;intérêt, car le système par défaut peut permettre déjà pas mal d&#8217;utilisations intéressantes), on utilise<a href="http://fr.php.net/set_error_handler"> la fonction set_error_handler()</a> dont voici la signature : <code>mixed set_error_handler  ( callback $error_handler  [, int $error_types= E_ALL | E_STRICT  ] )</code></p>
<p>On remarque le callback en premier argument, j&#8217;ai toujours imaginé y préciser une fonction, surtout que dans le cas de <a href="http://fr.php.net/set_error_handler">set_error_handler()</a> la description des arguments enfonce le clou :</p>
<blockquote><p>La fonction utilisateur doit accepter deux paramètres : le code d&#8217;erreur et une chaîne décrivant le code d&#8217;erreur.</p></blockquote>
<p>Mais <a href="http://fr.php.net/manual/fr/language.pseudo-types.php#language.types.callback">on peut aussi utiliser une méthode d&#8217;un objet</a> (ce à quoi je n&#8217;avais jamais prêté attention).</p>
<blockquote><p>Une méthode d&#8217;un objet instancié est passée comme étant un tableau, contenant un objet à l&#8217;index 0 et le nom de la méthode à l&#8217;index 1.</p></blockquote>
<p>On se retrouve donc avec la possibilité de faire :</p>
<p><code><br />
class Error{<br />
   public function errorHandle()<br />
  {<br />
     //do some stuff<br />
  }<br />
}</p>
<p>$myErr = new Error('myrtilles');<br />
set_error_handler(array($myErr, 'errorHandle'));</code></p>
<p>Vous le saviez, je parie ?</p>
<br />Publié dans PHP  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/formatrice.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/formatrice.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/formatrice.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/formatrice.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/formatrice.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/formatrice.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/formatrice.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/formatrice.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/formatrice.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/formatrice.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/formatrice.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/formatrice.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/formatrice.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/formatrice.wordpress.com/123/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=formatrice.wordpress.com&amp;blog=1935751&amp;post=123&amp;subd=formatrice&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://formatrice.wordpress.com/2009/09/03/fonctions-de-callback-objet-possible/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">sarahhaim</media:title>
		</media:content>
	</item>
		<item>
		<title>Tutoriel sur la syntaxe Xpath en PHP5</title>
		<link>http://formatrice.wordpress.com/2009/05/15/tutoriel-xpath-php5/</link>
		<comments>http://formatrice.wordpress.com/2009/05/15/tutoriel-xpath-php5/#comments</comments>
		<pubDate>Fri, 15 May 2009 16:10:23 +0000</pubDate>
		<dc:creator>Sarah Haïm-Lubczanski</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://formatrice.wordpress.com/?p=109</guid>
		<description><![CDATA[Article paru dans Programmez Sommaire Qu&#8217;est-ce qu&#8217;XPath ? Comment l&#8217;utiliser en PHP5 ? Comment accéder aux éléments ? La syntaxe XPath appliquée à la recherche d&#8217;éléments Notation complète : Notation abrégée : Arborescence des noeuds : Désigner plusieurs noeuds à la fois : La syntaxe XPath appliquée à la recherche d&#8217;attributs La syntaxe XPath appliquée [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=formatrice.wordpress.com&amp;blog=1935751&amp;post=109&amp;subd=formatrice&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Article paru dans Programmez</p>
<h2>Sommaire</h2>
<ol>
<li>Qu&#8217;est-ce qu&#8217;XPath ?</li>
<li>Comment l&#8217;utiliser en PHP5 ?</li>
<li>Comment accéder aux éléments ?
<ol>
<li>La syntaxe XPath appliquée à la recherche d&#8217;éléments
<ol>
<li>Notation complète :</li>
<li>Notation abrégée :</li>
<li>Arborescence des noeuds :</li>
<li>Désigner plusieurs noeuds à la fois :</li>
</ol>
</li>
<li>La syntaxe XPath appliquée à la recherche d&#8217;attributs</li>
<li>La syntaxe XPath appliquée à la recherche de texte
<ol>
<li>Syntaxe d&#8217;un flux RSS 2.0 dans du XML</li>
<li>Exemple : afficher les titres de flux RSS contenant le mot PHP</li>
</ol>
</li>
</ol>
</li>
<li>Sources</li>
<li>En savoir plus</li>
</ol>
<ol>
<li>
<h2><a name="Qu_27est-ce_qu_27XPath__3F"><br />
Qu&#8217;est-ce qu&#8217;XPath ?</a></h2>
<p><span class="T1"><br />
XPath</span><br />
est un langage pour désigner une portion d&#8217;un document <a href="http://fr.wikipedia.org/wiki/Extensible_markup_language"><br />
XML</a><br />
.<br />
Au départ, XPath a été créé pour uniformiser une syntaxe entre XSL (feuilles de style pour documents XML) et XPointer (désigneurs de documents XML à  distance). Donc XPath permet d&#8217;accéder précisément à un élément d&#8217;un document XML.<br />
XPath est utilisé par les développeurs comme une syntaxe de tri et de recherche dans les documents XML, grâce à ses expressions régulières. En effet, couplé à un langage de programmation, par les boucles, on peut donc extraire des données précises d&#8217;un document XML. Une utilisation, par exemple  pourrait être de trier des titres de nouvelles arrivant dans un flux RSS, par un mot-clef.</li>
<li>
<h2><a name="Comment_l_27utiliser_en_PHP5__3F"><br />
Comment l&#8217;utiliser en PHP5 ?</a></h2>
<p>En PHP5, les fonctions DOMDocument ont été complétées par l&#8217;extension simpleXML qui ajoute une manière simple et orientée objet d&#8217;accéder à des arbres DOM, donc à tout document XML, ou XHTML.</li>
<li>
<h2><a name="Comment_acc_C3_A9der_aux__C3_A9l_C3_A9ments__3F"><br />
Comment accéder aux éléments ?</a></h2>
<p>Nous nous intéresserons aux noeuds de trois types :</p>
<ol style="margin-left:1.25cm;list-style-type:decimal;">
<li class="P4">
<p class="P4" style="margin-left:.25cm;">les noeuds d&#8217;éléments, c&#8217;est-à-dire les balises XML</p>
</li>
<li class="P4">
<p class="P4" style="margin-left:.25cm;">les noeuds d&#8217;attributs, qui ajoutent des informations aux balises</p>
</li>
<li class="P4">
<p class="P4" style="margin-left:.25cm;">les noeuds de texte, les données du document</p>
</li>
</ol>
<p>Notez que simpleXML propose déjà des méthodes pour accéder aux éléments et attributs.</p>
<ol>
<li>
<h2><a name="La_syntaxe_XPath_appliqu_C3_A9e__C3_A0_la_recherche_d_27_C3_A9l_C3_A9ments"><br />
La syntaxe XPath appliquée à la recherche d&#8217;éléments</a></h2>
<p>Il existe deux syntaxes pour noter le chemin à travers les éléments du DOM XML : la méthode complète, qui garantit le moins d&#8217;erreurs possibles et le plus de précision, et la méthode abrégée qui est plus rapide à écrire.<br />
Soient des balises, et je veux désigner l&#8217;élément c:</p>
<blockquote>
<p class="Code">&lt;a&gt;</p>
<p>&lt;b&gt;</p>
<p>&lt;c&gt;&lt;/c&gt;</p>
<p>&lt;c&gt;&lt;/c&gt;</p>
<p>&lt;c&gt;&lt;/c&gt;</p>
<p>&lt;/b&gt;</p>
<p>&lt;/a&gt;</p></blockquote>
<ol>
<li>
<h3 class="Heading3"><a name="Notation_compl_C3_A8te__3A"><br />
Notation complète :</a></h3>
<p class="Code">a/child::b/child::c</p>
</li>
<li>
<h3 class="Heading3"><a name="Notation_abr_C3_A9g_C3_A9e__3A"><br />
Notation abrégée :</a></h3>
<p class="Code">a/b/c</p>
<p>A retenir : on sépare les éléments par un slash, comme les répertoires Unix.<br />
On sépare les mots-clés de désignation du nom de l&#8217;élément par ::</li>
<li>
<h3 class="Heading3"><a name="Arborescence_des_noeuds__3A"><br />
Arborescence des noeuds :</a></h3>
<p>Pour accéder au noeud racine, on peut utiliser le signe /</p>
<p>Pour désigner le noeud sur lequel on travaille, on utilise la notation ./</p>
<p>Pour désigner le noeud parent, on utilise la notation ../</li>
<li>
<h3 class="Heading3"><a name="D_C3_A9signer_plusieurs_noeuds__C3_A0_la_fois__3A"><br />
Désigner plusieurs noeuds à la fois :</a></h3>
<p>Les caractères spéciaux permettent de choisir plusieurs éléments en une seule notation. On utilise l&#8217;étoile * comme caractère joker, et // pour outrepasser la désignation de l&#8217;arborescence.<br />
Exemples :<br />
Soit le XML</p>
<blockquote>
<p class="Code">&lt;a&gt;</p>
<p>&lt;b&gt;</p>
<p>&lt;c&gt;&lt;/c&gt;</p>
<p>&lt;c&gt;&lt;/c&gt;</p>
<p>&lt;c&gt;&lt;/c&gt;</p>
<p>&lt;/b&gt;</p>
<p>&lt;/a&gt;</p>
<p>&lt;a&gt;</p>
<p>&lt;b&gt;</p>
<p>&lt;c&gt;&lt;/c&gt;</p>
<p>&lt;c&gt;&lt;/c&gt;</p>
<p>&lt;c&gt;&lt;/c&gt;</p>
<p>&lt;/b&gt;</p>
<p>&lt;/a&gt;</p>
<p>&lt;a&gt;</p>
<p>&lt;b&gt;</p>
<p>&lt;c&gt;&lt;/c&gt;</p>
<p>&lt;c&gt;&lt;/c&gt;</p>
<p>&lt;c&gt;&lt;/c&gt;</p>
<p>&lt;/b&gt;</p>
<p>&lt;c&gt;&lt;/c&gt;</p>
<p>&lt;c&gt;&lt;/c&gt;</p>
<p>&lt;/a&gt;</p></blockquote>
<p>Je désigne tous les noeuds enfants de a par a/* (je récupère donc les noeuds b et c).</p>
<p>Je désigne tous les c contenus dans un élément b par b//c, si je souhaite au contraire tous les éléments c<br />
quel que soit le noeud parent, je ferais //c<br />
Attention, on postule que la DTD autorise des éléments c<br />
qui ne seraient pas dans &lt;b&gt;<br />
On peut également combiner les choix dans les fonctions par le caractère | (pipe).</li>
</ol>
</li>
<li>
<h2><a name="La_syntaxe_XPath_appliqu_C3_A9e__C3_A0_la_recherche_d_27attributs"><br />
La syntaxe XPath appliquée à la recherche d&#8217;attributs</a></h2>
<p>La notation longue des attributs se fait par le mot clef attribute, et la notation abrégée par le caractère @.</p>
<p class="Code">&lt;personne&gt;</p>
<p>&lt;yeux couleur =&#8221;bleu&#8221;&gt;</p>
<p>&lt;/yeux&gt;</p>
<p>&lt;cheveux couleur=&#8221;blond&#8221;&gt;longs&lt;/cheveux&gt;</p>
<p>&lt;/personne&gt;</p>
<p>&lt;personne&gt;</p>
<p>&lt;yeux couleur =&#8221;gris&#8221;&gt;</p>
<p>&lt;/yeux&gt;</p>
<p>&lt;cheveux couleur=&#8221;blond&#8221;&gt;en brosse&lt;/cheveux&gt;</p>
<p>&lt;/personne&gt;</p>
<p>&lt;personne&gt;</p>
<p>&lt;yeux couleur =&#8221;brun&#8221;&gt;</p>
<p>&lt;/yeux&gt;</p>
<p>&lt;cheveux couleur=&#8221;noir&#8221;&gt;courts&lt;/cheveux&gt;</p>
<p>&lt;/personne&gt;</p>
<p>Pour désigner les attributs de couleurs d&#8217;yeux, je note :</p>
<blockquote>
<p class="Code">/child::personne/child::yeux/attribute::couleur (complète)<br />
/personne/yeux/@couleur (abrégée)</p></blockquote>
</li>
<li>
<h2><a name="La_syntaxe_XPath_appliqu_C3_A9e__C3_A0_la_recherche_de_texte"><br />
La syntaxe XPath appliquée à la recherche de texte</a></h2>
<p>On utilise la fonction contains(chaine, motif). Depuis PHP, notre chaîne sera le titre de la nouvelle qu&#8217;on souhaite examiner. On peut examiner aussi bien les noeuds que leurs attributs, que le texte contenu dans le noeud élément.</p>
<h3 class="Heading3"><a name="Syntaxe_d_27un_flux_RSS_2.0_dans_du_XML"></a><br />
Syntaxe d&#8217;un flux RSS 2.0 dans du XML</h3>
<blockquote>
<p class="Code">&lt;rss version=&#8221;2.0&#8243;&gt;</p>
<p>&lt;channel&gt;</p>
<p>&lt;title&gt;Titre du channel&lt;/title&gt;</p>
<p>&lt;link&gt;http://www.monsite.com&lt;/link&gt;</p>
<p>&lt;description&gt;Description du channel&lt;/description&gt;</p>
<p>items&#8230;</p>
<p>&lt;/channel&gt;</p>
<p>&lt;/rss&gt;</p></blockquote>
<h3 class="Heading3"><a name="Exemple__3A_afficher_les_titres_de_flux_RSS_contenant_le_mot_PHP"><br />
Exemple : afficher les titres de flux RSS contenant le mot PHP</a></h3>
<blockquote>
<p class="PHP">//On spécifie les sources RSS</p>
<p>$tablo_flux[0] = &#8216;http://afup.org/backend.php3&#8242;;</p>
<p>$tablo_flux[1] = &#8216;http://www.nexen.net/index2.php?option=com_rss&amp;feed=RSS0.91&amp;no_html=1&#8242;;</p>
<p>$tablo_flux[2] = &#8216;http://news.google.fr/news?oe=utf-8&amp;client=firefox-a&amp;rls=org.mozilla:fr:official&amp;tab=dn&amp;ned=fr&amp;topic=t&amp;output=rss&#8217;;</p>
<p>// Nous connaissons l&#8217;arborescence de ces flux, car c&#8217;est spécifié</p>
<p>for($i=0;$i &lt; count($tablo_flux);$i++)</p>
<p>{</p>
<p>$racine[$i] = simplexml_load_file($tablo_flux[$i]);</p>
<p>//sensible à la casse</p>
<p>$recherche = &#8216;/rss/channel/item[contains(title,"PHP")]/title&#8217;;</p>
<p>$titres = $racine[$i]-&gt;xpath($recherche);</p>
<p>// Quand il n&#8217;y a pas de résultat, $titres vaut FALSE</p>
<p>if($titres)</p>
<p>{</p>
<p>foreach($titres as $actu)</p>
<p>{</p>
<p>echo &#8216;&lt;a href=&#8221;&#8216;.htmlentities((string)$actu-&gt;link).&#8217;&#8221;&gt;&#8217;.utf8_decode($actu).&#8221;&lt;/a&gt;&lt;br /&gt;&#8221;;</p>
<p>}</p>
<p>}</p>
<p>}</p></blockquote>
</li>
</ol>
</li>
<li>
<h2><a name="Sources"><br />
Sources </a></h2>
<p><a href="http://fr.wikipedia.org/wiki/XPath"></p>
<p>http://fr.wikipedia.org/wiki/XPath</a></p>
<p><a href="http://xmlfr.org/w3c/TR/xpath/"></p>
<p>http://xmlfr.org/w3c/TR/xpath/</a></p>
<p><a href="http://www.w3.org/TR/xpath20/"></p>
<p>http://www.w3.org/TR/xpath20/</a></p>
<p><a href="http://fr.selfhtml.org/xml/representation/syntaxexpath.htm"></a></p>
<p><a href="http://fr.selfhtml.org/xml/representation/syntaxexpath.htm">http://fr.selfhtml.org/xml/representation/syntaxexpath.htm</a><br />
<a href="http://jerome.developpez.com/xmlxsl/xpath/?lpage=&amp;rpage=1"></p>
<p>http://jerome.developpez.com/xmlxsl/xpath/?lpage=&#038;rpage=1</a></p>
<p><a href="http://www.oreilly.com/catalog/xmlnut/chapter/ch09.html"></p>
<p>http://www.oreilly.com/catalog/xmlnut/chapter/ch09.html</a></p>
<p><a href="http://www.oreilly.com/catalog/xmlnut/chapter/ch09.html"></p>
<p>http://www.stervinou.com/projets/rss/</a></li>
<li>
<h2><a name="En_savoir_plus"><br />
En savoir plus</a></h2>
<p>Article de Wikipedia sur Xpath<br />
<a href="http://fr.wikipedia.org/wiki/XPath"></p>
<p>http://fr.wikipedia.org/wiki/XPath</a></p>
<p>Norme du W3C sur XPath<br />
<a href="http://www.w3.org/TR/xpath"></a></p>
<p><a href="http://www.w3.org/TR/xpath">http://www.w3.org/TR/xpath</a><br />
Manuel PHP sur SimpleXML<br />
<a href="http://fr2.php.net/manual/fr/ref.simplexml.php"></p>
<p>http://fr2.php.net/manual/fr/ref.simplexml.php</a></p>
<p class="Standard">Extrait d&#8217;un ouvrage O&#8217;Reilly (XML in a Nutshell <span class="T2"><br />
By Elliotte Rusty Harold &amp; W. Scott Means</span><br />
)<br />
<a href="http://www.oreilly.com/catalog/xmlnut/chapter/ch09.html"></p>
<p>http://www.oreilly.com/catalog/xmlnut/chapter/ch09.html</a></p>
<p>Les fonctions Xpath <a href="http://fr.selfhtml.org/xml/representation/fonctionsxpath.htm"></a></p>
<p><a href="http://fr.selfhtml.org/xml/representation/fonctionsxpath.htm">http://fr.selfhtml.org/xml/representation/fonctionsxpath.htm</a><br />
Former des flux RSS 2.0 http://ghostdogpr.developpez.com/articles/rss/</li>
</ol>
<br />Publié dans PHP  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/formatrice.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/formatrice.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/formatrice.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/formatrice.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/formatrice.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/formatrice.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/formatrice.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/formatrice.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/formatrice.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/formatrice.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/formatrice.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/formatrice.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/formatrice.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/formatrice.wordpress.com/109/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=formatrice.wordpress.com&amp;blog=1935751&amp;post=109&amp;subd=formatrice&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://formatrice.wordpress.com/2009/05/15/tutoriel-xpath-php5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">sarahhaim</media:title>
		</media:content>
	</item>
		<item>
		<title>Utiliser un champ BLOB dans Symfony 1.2 (Propel 1.3)</title>
		<link>http://formatrice.wordpress.com/2009/04/10/utiliser-un-champ-blob-dans-symfony-12-propel-13/</link>
		<comments>http://formatrice.wordpress.com/2009/04/10/utiliser-un-champ-blob-dans-symfony-12-propel-13/#comments</comments>
		<pubDate>Fri, 10 Apr 2009 00:00:47 +0000</pubDate>
		<dc:creator>Sarah Haïm-Lubczanski</dc:creator>
				<category><![CDATA[Outils]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Question]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://formatrice.wordpress.com/?p=103</guid>
		<description><![CDATA[Le contexte : une application PHP/MySQL, un champ BLOB dans l&#8217;application avec Symfony. Par défaut, nous avions laissé Propel pour faire nos tests. Le souci d&#8217;un champ BLOB est sa contenance. Lorsque je veux lister tous mes enregistrements, si un des champs est BLOB, il est difficile de l&#8217;afficher directement dans le listing. Au niveau [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=formatrice.wordpress.com&amp;blog=1935751&amp;post=103&amp;subd=formatrice&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Le contexte :</strong> une application PHP/MySQL, un champ BLOB dans l&#8217;application avec Symfony. Par défaut, nous avions laissé Propel pour faire nos tests.</p>
<p>Le souci d&#8217;un champ BLOB est sa contenance. <strong>Lorsque je veux lister tous mes enregistrements, si un des champs est BLOB, il est difficile de l&#8217;afficher directement dans le listing.</strong> Au niveau de la modélisation, j&#8217;ai donc intérêt à prévoir que ce champ sera ramené plus tard.<br />
Symfony-Propel me propose une technique : préciser dans le YAML que ce champ sera rapporté à la demande.<br />
<code> commentaires_longs: {type: blob, lazyLoad: true}</code></p>
<p>Ensuite, lors de la récupération, j&#8217;ai tout intérêt à proposer un lien vers le contenu long (en saupoudrant éventuellement d&#8217;Ajax pour fournir à l&#8217;utilisateur une prévisualisation au survol). Il serait en effet trop coûteux de rapporter ce champ, en performance et en place sur la page web.<br />
Au moment où je souhaite obtenir le commentaire, je pourrais faire :<br />
<code>$criteria-&gt;clearSelectColumns();<br />
$criteria-&gt;addSelectColumn(ObjetPeer::COMMENTAIRES_LONG);<br />
$rs =ObjetPeer::doSelectStmt($criteria);</code><br />
Attention : actuellement, la méthode est doSelectStmt() et plus doSelectRS(), ne vous faites pas avoir.<br />
Ensuite, vous récupérez un objet de la classe PDOStatement, il faut ensuite l&#8217;exploiter avec un fetch().</p>
<p>Au niveau de la conception de l&#8217;application, on peut imaginer mettre ces champs longs dans des tables séparées, puisqu&#8217;il sera rare qu&#8217;on les reprenne en même temps que les autres.</p>
<br />Publié dans Outils, PHP, Question Tagged: PHP, programming, symfony <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/formatrice.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/formatrice.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/formatrice.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/formatrice.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/formatrice.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/formatrice.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/formatrice.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/formatrice.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/formatrice.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/formatrice.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/formatrice.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/formatrice.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/formatrice.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/formatrice.wordpress.com/103/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=formatrice.wordpress.com&amp;blog=1935751&amp;post=103&amp;subd=formatrice&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://formatrice.wordpress.com/2009/04/10/utiliser-un-champ-blob-dans-symfony-12-propel-13/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">sarahhaim</media:title>
		</media:content>
	</item>
		<item>
		<title>Les nouvelles façons de faire depuis symfony 1.1</title>
		<link>http://formatrice.wordpress.com/2009/01/09/les-nouvelles-facons-de-faire-depuis-symfony-11/</link>
		<comments>http://formatrice.wordpress.com/2009/01/09/les-nouvelles-facons-de-faire-depuis-symfony-11/#comments</comments>
		<pubDate>Fri, 09 Jan 2009 09:04:17 +0000</pubDate>
		<dc:creator>Sarah Haïm-Lubczanski</dc:creator>
				<category><![CDATA[Outils]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Frameworks Ajax]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://formatrice.wordpress.com/?p=99</guid>
		<description><![CDATA[Petit aide-mémoire que je complète au fur et à mesure. Les nouvelles commandes sont bien plus agréables et bien plus logiques. Elles ont été regroupées en espaces de noms. symfony generate:module nomprojet nommodule symfony propel:build-all Enfin l&#8217;information que je cherchais depuis une heure, à savoir, comment supprimer le champ created_at de mon formulaire (généré automatiquement) [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=formatrice.wordpress.com&amp;blog=1935751&amp;post=99&amp;subd=formatrice&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><em>Petit aide-mémoire que je complète au fur et à mesure.</em></p>
<p>Les nouvelles commandes sont bien plus agréables et bien plus logiques. Elles ont été regroupées en espaces de noms.</p>
<blockquote><p>symfony generate:module nomprojet nommodule</p></blockquote>
<blockquote><p>symfony propel:build-all</p></blockquote>
<p>Enfin l&#8217;information que je cherchais depuis une heure, à savoir, <a href="http://www.symfony-project.org/book/forms/1_1/fr/04-Propel-Integration#La suppression d'un champ">comment supprimer le champ created_at</a> de mon formulaire (généré automatiquement) de création d&#8217;item :</p>
<blockquote><p>Pour supprimer un champ, il est nécessaire de supprimer son validateur et son widget.</p></blockquote>
<p>Une autre façon, qui n&#8217;est pas nouvelle, mais qui rejoint les difficultés de symfony : il ne faut pas mettre de else aux if isValid(), car sinon le flux de validation du formulaire ne s&#8217;effectue pas.<br />
<code><br />
if($request-&gt;isMethod('post'))<br />
{<br />
$this-&gt;form-&gt;bind($request-&gt;getParameter('unbug'));<br />
if($form-&gt;isValid())<br />
{<br />
$form-&gt;save();<br />
$this-&gt;redirect('bugs/lister');<br />
}<br />
}<br />
</code></p>
<p>Et ce qu&#8217;il y a de bon à savoir avec les formulaires, c&#8217;est que les classes liées (relation 1-N) doivent avoir une méthode toString() pour pouvoir être utilisable via la génération automatique de CRUD.<br />
En mode dev (appli_dev.php/module/action) le message s&#8217;affiche clairement.</p>
<br />Publié dans Outils, PHP Tagged: Frameworks Ajax, symfony <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/formatrice.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/formatrice.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/formatrice.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/formatrice.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/formatrice.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/formatrice.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/formatrice.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/formatrice.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/formatrice.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/formatrice.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/formatrice.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/formatrice.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/formatrice.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/formatrice.wordpress.com/99/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=formatrice.wordpress.com&amp;blog=1935751&amp;post=99&amp;subd=formatrice&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://formatrice.wordpress.com/2009/01/09/les-nouvelles-facons-de-faire-depuis-symfony-11/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">sarahhaim</media:title>
		</media:content>
	</item>
		<item>
		<title>Comment formater un résultat dans une Macro OpenOffice ?</title>
		<link>http://formatrice.wordpress.com/2008/12/23/comment-formater-un-resultat-dans-une-macro-openoffice/</link>
		<comments>http://formatrice.wordpress.com/2008/12/23/comment-formater-un-resultat-dans-une-macro-openoffice/#comments</comments>
		<pubDate>Tue, 23 Dec 2008 10:58:49 +0000</pubDate>
		<dc:creator>Sarah Haïm-Lubczanski</dc:creator>
				<category><![CDATA[OpenOffice]]></category>
		<category><![CDATA[Question]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://formatrice.wordpress.com/?p=70</guid>
		<description><![CDATA[Le résultat est toujours retourné tronqué de ses décimales. Sub FormaterCorrectement() rem question : Comment formater Const EURO As Double = 6.55957 Dim mesFrancs As Double Dim Resultat As Double mesFrancs = InputBox("Saisissez la somme en francs") Resultat = CDbl(Format(mesFrancs / EURO, "##.00")) ' Je convertis en Double le formatage à deux décimales du résultat [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=formatrice.wordpress.com&amp;blog=1935751&amp;post=70&amp;subd=formatrice&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Le résultat est toujours retourné tronqué de ses décimales.<br />
<code>Sub FormaterCorrectement()<br />
rem question : Comment formater</p>
<p>Const EURO As Double = 6.55957<br />
Dim mesFrancs As Double<br />
Dim Resultat As Double</p>
<p>mesFrancs = InputBox("Saisissez la somme en francs")<br />
Resultat = CDbl(Format(mesFrancs / EURO, "##.00"))<br />
' Je convertis en Double le formatage à deux décimales du résultat<br />
'     sinon le résultat avant l'affichage est casté et la partie décimale tombe</p>
<p>MsgBox(Resultat, 64 ,  "Résultat de la conversion")</p>
<p>End Sub</code></p>
<br />Publié dans OpenOffice, Question Tagged: programming, Question <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/formatrice.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/formatrice.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/formatrice.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/formatrice.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/formatrice.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/formatrice.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/formatrice.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/formatrice.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/formatrice.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/formatrice.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/formatrice.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/formatrice.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/formatrice.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/formatrice.wordpress.com/70/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=formatrice.wordpress.com&amp;blog=1935751&amp;post=70&amp;subd=formatrice&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://formatrice.wordpress.com/2008/12/23/comment-formater-un-resultat-dans-une-macro-openoffice/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">sarahhaim</media:title>
		</media:content>
	</item>
		<item>
		<title>Astuce : créer des valeurs pour un tableau PHP avec son éditeur de code</title>
		<link>http://formatrice.wordpress.com/2008/10/15/astuce-creer-des-valeurs-pour-un-tableau-php-avec-son-editeur-de-code/</link>
		<comments>http://formatrice.wordpress.com/2008/10/15/astuce-creer-des-valeurs-pour-un-tableau-php-avec-son-editeur-de-code/#comments</comments>
		<pubDate>Wed, 15 Oct 2008 10:30:11 +0000</pubDate>
		<dc:creator>Sarah Haïm-Lubczanski</dc:creator>
				<category><![CDATA[Outils]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://formatrice.wordpress.com/?p=87</guid>
		<description><![CDATA[J&#8217;ai une liste de valeur, une par ligne, et je souhaite déclarer un tableau PHP contenant ces valeurs. Voici comment procéder (j&#8217;ai utilisé Scintilla, donc je mets les options que j&#8217;ai utilisées, mais c&#8217;est transposable à n&#8217;importe quel outil). Lancer le Rechercher/Remplacer avec CTRL + H Inscrire \n et cocher &#8216;Transform backslah expressions&#8217; Remplacer par [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=formatrice.wordpress.com&amp;blog=1935751&amp;post=87&amp;subd=formatrice&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>J&#8217;ai une liste de valeur, une par ligne, et je souhaite déclarer un tableau PHP contenant ces valeurs.<br />
Voici comment procéder (j&#8217;ai utilisé Scintilla, donc je mets les options que j&#8217;ai utilisées, mais c&#8217;est transposable à n&#8217;importe quel outil).</p>
<ol>
<li>Lancer le Rechercher/Remplacer avec CTRL + H</li>
<li>Inscrire <strong>\n</strong> et cocher &#8216;Transform backslah expressions&#8217;</li>
<li>Remplacer par <strong>&#8216;,&#8217;</strong></li>
<li><strong>\r</strong> et laisser coché &#8216;Transform backslah expressions&#8217;</li>
<li>Remplacer par <strong>chaîne vide</strong></li>
<li>Ajouter la quote du début, et celle de fin</li>
</ol>
<br />Publié dans Outils, PHP Tagged: howto, tip <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/formatrice.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/formatrice.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/formatrice.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/formatrice.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/formatrice.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/formatrice.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/formatrice.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/formatrice.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/formatrice.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/formatrice.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/formatrice.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/formatrice.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/formatrice.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/formatrice.wordpress.com/87/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=formatrice.wordpress.com&amp;blog=1935751&amp;post=87&amp;subd=formatrice&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://formatrice.wordpress.com/2008/10/15/astuce-creer-des-valeurs-pour-un-tableau-php-avec-son-editeur-de-code/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">sarahhaim</media:title>
		</media:content>
	</item>
	</channel>
</rss>
