<?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>Anna Filina &#187; PHP</title>
	<atom:link href="http://annafilina.com/blog/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://annafilina.com/blog</link>
	<description>I fix stuff</description>
	<lastBuildDate>Thu, 17 May 2012 19:58:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Podcast About Sexism in Tech: What I Learned</title>
		<link>http://annafilina.com/blog/sexism-in-tech/</link>
		<comments>http://annafilina.com/blog/sexism-in-tech/#comments</comments>
		<pubDate>Tue, 27 Mar 2012 13:30:59 +0000</pubDate>
		<dc:creator>Anna</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Gender]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://annafilina.com/blog/?p=741</guid>
		<description><![CDATA[I had the pleasure of discussing with fellow members of the PHP community a very sensitive topic: sexism in tech. I have been invited to a special episode of Voices of the ElePHPant with Elizabeth (Beth) Tucker Long, Elizabeth (Liz) Naramore and Laura Thomson. Cal Evans was the host. The podcast&#8217;s page features links for some<div><a href="http://annafilina.com/blog/sexism-in-tech/">Read the rest...</a></div><br />]]></description>
			<content:encoded><![CDATA[<p>I had the pleasure of discussing with fellow members of the PHP community a very sensitive topic: sexism in tech. I have been invited to a special <a href="http://voicesoftheelephpant.com/2012/03/27/sexism-in-tech">episode of Voices of the ElePHPant</a> with Elizabeth (Beth) Tucker Long, Elizabeth (Liz) Naramore and Laura Thomson. Cal Evans was the host. The podcast&#8217;s page features links for some of the topics discussed.</p>
<p>The purpose of this post is not to transcribe the podcast, but to share with you what I learned from this conversation and what I personally took away from it.</p>
<h3>The Culture and the Issues</h3>
<p>Although many say that the culture does not make women flee or prevent them from joining, Laura argued that it may, at the very least, prevent women from contributing. While it would seem that the culture doesn&#8217;t want to change, Liz said that many men participate in criticism against sexist behavior, which shows that the community actually cares for an attitude change. She also supported empathy and respect as opposed to only increasing the number of women in tech, which is also a big part of the desired change.</p>
<p>I have a problem with the way some of the sexism issues are brought to attention. I believe Twitter to be a poor medium: no body language, no intonation and only 140 characters at a time. When someone is being impolite or curses, a dialog is hard to establish and important issues often get overlooked because of that. Beth agreed with me that swearing and getting confrontational is not helpful, but we do need to address the problems regardless.</p>
<h3>Brand Hygiene and Admitting Wrongs</h3>
<p>We agreed that the nature of the brand or the gender of the perpetrator do not matter. Having women dancing around in underwear, when associated with a brand, will project a certain image of that brand. It&#8217;s up to the brand to decide whether it is the image that it is looking for.</p>
<p>I came to understand that no matter in what manner issues are raised, they should be treated as basic customer service issues. A company should not take it personal. Implied economic threats (by bringing employers into a discussion) are unethical and need to be avoided at all costs.</p>
<p>Liz taught us that it&#8217;s ok to apologize, even if we didn&#8217;t mean to offend. &#8220;When you bump into someone on the street, whether or not you meant it, you say that you&#8217;re sorry.&#8221; I hope that nerds will find it easier to admit a wrong with this analogy in mind.</p>
<h3>Will the Industry Mature?</h3>
<p>Liz argued that if left to our own devices, no change will come. Beth stated that sexist behavior is not appropriate, no matter how young you are. &#8220;Young people have the same capacity to reason as older people.&#8221; Also, such behavior is not limited to young people and it&#8217;s unfair to blame it all on them. In the meantime, Laura said, we must be allowed to be creative and enjoy our industry. That means calling out people who step out of line.</p>
<h3>Conclusion</h3>
<p>We have come to an agreement that spending all our efforts criticizing bad behavior takes effort away from doing something about it. It&#8217;s alright to point out something inappropriate to help people recognize when they have done something wrong. According to Beth, the real way to solve this problem is to &#8220;mentor and encourage people who are feeling excluded or discouraged and help them out, be it women or other minority group that&#8217;s feeling left out&#8221;.</p>
<p>It&#8217;s good to have groups that help these minorities, as long as it doesn&#8217;t exclude others, because then they will be separated once more. One such group is PHP Women.</p>
<p>I will personally be presenting a PHP Workshop for Women with the support of Montreal Girl Geeks next month. I will post a link as soon as we have details about the venue. I&#8217;m still looking for training assistants as well. Tentative date is April 26th.</p>
]]></content:encoded>
			<wfw:commentRss>http://annafilina.com/blog/sexism-in-tech/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Symfony Form: Extract Values</title>
		<link>http://annafilina.com/blog/symfony-form-extract-values/</link>
		<comments>http://annafilina.com/blog/symfony-form-extract-values/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 13:20:46 +0000</pubDate>
		<dc:creator>Anna</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://annafilina.com/blog/?p=697</guid>
		<description><![CDATA[I had to look deep into Symfony 1.4 code this morning as I was trying to get a field&#8217;s value. Form values come from different sources: default values, record values (when editing, for example), original POST values and clean POST values. So when is each available and how do we get it?
Get the values by<div><a href="http://annafilina.com/blog/symfony-form-extract-values/">Read the rest...</a></div><br />]]></description>
			<content:encoded><![CDATA[<p>I had to look deep into Symfony 1.4 code this morning as I was trying to get a field&#8217;s value. Form values come from different sources: default values, record values (when editing, for example), original POST values and clean POST values. So when is each available and how do we get it?</p>
<h3>Get the values by type</h3>
<p>Default values are what you will be presented with when you display an empty form.</p>
<blockquote><p>Get all values using $form-&gt;getDefaults() or a single value using $form-&gt;getDefault($name).</p></blockquote>
<p>Record values, which are merged with the default values, are displayed when a Doctrine record is associated with the form.</p>
<blockquote><p>Get all values using $form-&gt;getDefaults() or a single value using $form-&gt;getDefault($name).</p></blockquote>
<p>Original POST values are displayed when the form validation failed.</p>
<blockquote><p>Get all values using $form-&gt;getTaintedValues().</p></blockquote>
<p>Clean POST values are the ones that have been validated and transformed by the form validators. At that point, you will most likely choose to save the form and redirect.</p>
<blockquote><p>Get all values using $form-&gt;getValues() or a single value using $form-&gt;getValue($name).</p></blockquote>
<h3>Get all values regardless of origin</h3>
<p>In one scenario, I needed to access the form&#8217;s values to inject them into Javascript. There is a method to extract a value as it will appear in the HTML, without worrying about whether it&#8217;s default, record, dirty  POST or clean POST.</p>
<blockquote><p>Get the value directly from the field using $form-&gt;offsetGet($name)-&gt;getValue(). Alternatively, you can use $form[$name]-&gt;getValue() which will yield the same result.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://annafilina.com/blog/symfony-form-extract-values/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Their Programming Language Sucks!</title>
		<link>http://annafilina.com/blog/their-prog-language-sucks/</link>
		<comments>http://annafilina.com/blog/their-prog-language-sucks/#comments</comments>
		<pubDate>Fri, 02 Sep 2011 13:16:14 +0000</pubDate>
		<dc:creator>Anna</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://annafilina.com/blog/?p=690</guid>
		<description><![CDATA[Or at least this is what I hear often all around me. Many want to think that their language is better than all others, and go to great lengths to discredit them. Just like at sport events, people would paint their faces in their team&#8217;s colors and yell insults at the opponents.
I&#8217;m here to tell you that<div><a href="http://annafilina.com/blog/their-prog-language-sucks/">Read the rest...</a></div><br />]]></description>
			<content:encoded><![CDATA[<p>Or at least this is what I hear often all around me. Many want to think that their language is better than all others, and go to great lengths to discredit them. Just like at sport events, people would paint their faces in their team&#8217;s colors and yell insults at the opponents.</p>
<p>I&#8217;m here to tell you that all languages are great and suck in their own way. There is no need to switch to a language just because someone told you that it was better; that&#8217;s often irrelevant, although counter-intuitive. You will always be more productive with the language that you have worked with for the past 10 or more years. While you spend another 10 years becoming an expert in a new language, you&#8217;re providing lower value for your customers. And what if by the time you are finally done switching, a shiny new awesome language comes out? You&#8217;ll be chasing your tail all your life. It&#8217;s like trying to keep up with teenage fashion.</p>
<p>If you&#8217;re fresh out of college, the same rules don&#8217;t apply. You&#8217;re not an expert in anything yet, even if your youth arrogance screams otherwise. You haven&#8217;t dealt with clients that will have your head on a spike if you don&#8217;t meet the deadline. You didn&#8217;t have junior freelancers do half the work, encrypt their code and disappear. You didn&#8217;t have to take over large teams that wasted millions of dollars and haven&#8217;t even finished arguing about the framework. Those are the real problems.</p>
<p>When you didn&#8217;t swear any allegiances yet, you are free to choose your language. So choose one that has potential in your eyes, one that has strong community support (even if it&#8217;s not an open source language), one that has good job prospects, one that has training and conferences available&#8230; this is what&#8217;s going to affect your life most, and not some pretty syntax.</p>
<p>In conclusion, I&#8217;d like to say that it&#8217;s not helpful to attack a programming language based on function names, frequency of releases, syntax, market share and other meaningless aspects. The real questions that you should be asking are whether your sh*t can be written in that language and whether you can get a well-paid job or contract. Finally, a diversity of languages and philosophies should be encouraged, so that we can learn from them and bring the concepts back to our own little world and flourish.</p>
]]></content:encoded>
			<wfw:commentRss>http://annafilina.com/blog/their-prog-language-sucks/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Public Call for Papers: What Does That Mean?</title>
		<link>http://annafilina.com/blog/public-call-for-papers/</link>
		<comments>http://annafilina.com/blog/public-call-for-papers/#comments</comments>
		<pubDate>Mon, 18 Jul 2011 19:37:07 +0000</pubDate>
		<dc:creator>Anna</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Conference]]></category>
		<category><![CDATA[ConFoo]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://annafilina.com/blog/?p=652</guid>
		<description><![CDATA[Some of you may have already heard that the ConFoo call for papers is already open. The great thing about it this year, is that it&#8217;s public. This means that anyone can vote on the proposals. Besides being fun for the speakers and attendees, it opens up a whole lot of possibilities.
Selection
As organizers, we can<div><a href="http://annafilina.com/blog/public-call-for-papers/">Read the rest...</a></div><br />]]></description>
			<content:encoded><![CDATA[<p>Some of you may have already heard that the <a href="http://confoo.ca/en/call-for-papers">ConFoo call for papers</a> is already open. The great thing about it this year, is that it&#8217;s public. This means that anyone can vote on the proposals. Besides being fun for the speakers and attendees, it opens up a whole lot of possibilities.</p>
<h3>Selection</h3>
<p>As organizers, we can provide our attendees with better content. Not just with content that we believe is good, but with content that people actually want to see. However, public votes will not be the only selection criteria, because we need to balance the content and our budget (we are, after all, non for profit). Don&#8217;t be upset if you were not selected even if you had many positive votes. We get hundreds of proposals each year and a limited number of slots.</p>
<h3>Topic Spread</h3>
<p>Many speakers do not propose on certain topics, because they expect many others to propose on the same thing. But you never know! It is possible to completely overlook an important topic simply because everyone is expecting someone else to submit, and doesn&#8217;t want to compete for it. This happens every year.</p>
<p>Now, a speaker can see other proposals by tag. If a tag or topic has little or no proposals, then the speaker would be tempted to submit. Even if there are proposals, a speaker may decide to offer a different perspective, or decide that the other proposal does represent the topic well enough.</p>
<h3>Speaker Guidelines</h3>
<p>By seeing what other do, speakers get a better picture of what works and what doesn&#8217;t. If a speaker sees that a topic had great votes, it will give him an idea of what makes a good topic. If the score is low, then he&#8217;ll know what to avoid. In any case, it&#8217;s good to know how others do it.</p>
<p>Also, consider a speaker whose proposals got low scores. He can try to figure out what&#8217;s wrong and fix it, or propose different topics that he believes are more appealing to the public. No more getting feedback when it&#8217;s already too late (and hope to see you next year)!</p>
<h3>Scheduling</h3>
<p>Once the papers are selected by the committee, creating a timetable is not an easy task. The ConFoo team spends weeks every year trying to find the best arrangement. With all the votes that will come in, we will be able to better determine the appropriate room size based on popularity. We will also be able to see which topics the same attendees are interested in, and schedule them at different times as much as possible.</p>
<h3>Promotion</h3>
<p>The more attendees we have, the better conference we can deliver. We hope that the speakers will promote their proposals in order to get votes, thus letting people know about ConFoo. More attendees also mean a bigger audience for speakers, so spread the good word!</p>
<p>Follow @confooca and share with the #confoo tag.</p>
]]></content:encoded>
			<wfw:commentRss>http://annafilina.com/blog/public-call-for-papers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sync git fork with maintainer</title>
		<link>http://annafilina.com/blog/sync-git-fork-with-maintainer/</link>
		<comments>http://annafilina.com/blog/sync-git-fork-with-maintainer/#comments</comments>
		<pubDate>Mon, 30 May 2011 21:28:57 +0000</pubDate>
		<dc:creator>Anna</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://annafilina.com/blog/?p=605</guid>
		<description><![CDATA[I forked the joind.in project on GitHub, committed a few patches and sent pull requests. It was fun until I asked myself &#8220;how do I keep my fork synced with the maintainer&#8217;s repo?&#8221; I found the info (with minor bug) on Google Groups by Matt Todd. It deserved its own post post.
Create and checkout &#8220;upstream/master&#8221;<div><a href="http://annafilina.com/blog/sync-git-fork-with-maintainer/">Read the rest...</a></div><br />]]></description>
			<content:encoded><![CDATA[<p>I forked the joind.in project on GitHub, committed a few patches and sent pull requests. It was fun until I asked myself &#8220;how do I keep my fork synced with the maintainer&#8217;s repo?&#8221; I found the info (with minor bug) on Google Groups by Matt Todd. It deserved its own post post.</p>
<p>Create and checkout &#8220;upstream/master&#8221; branch (or whatever you want to call it):</p>
<pre class="brush:shell">git checkout -b upstream/master</pre>
<p>Link branch to maintainer&#8217;s repo:</p>
<pre class="brush:shell">git remote add upstream git://github.com/upstream_maintainer/master.git</pre>
<p>Pull maintainer&#8217;s repo:</p>
<pre class="brush:shell">git pull upstream master</pre>
<p>Switch to your fork&#8217;s master branch:</p>
<pre class="brush:shell">git checkout master</pre>
<p>Merge maintainer&#8217;s repo into your fork:</p>
<pre class="brush:shell">git merge upstream/master</pre>
<h3>Subsequent syncs</h3>
<p>The next time you want to sync, you only need to switch branches, pull and merge:</p>
<pre class="brush:shell">git checkout upstream/master
git pull upstream master
git checkout master
git merge upstream/master</pre>
]]></content:encoded>
			<wfw:commentRss>http://annafilina.com/blog/sync-git-fork-with-maintainer/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Symfony task &#8220;default&#8221; context</title>
		<link>http://annafilina.com/blog/symfony-task-default-context/</link>
		<comments>http://annafilina.com/blog/symfony-task-default-context/#comments</comments>
		<pubDate>Tue, 17 May 2011 03:27:37 +0000</pubDate>
		<dc:creator>Anna</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://annafilina.com/blog/?p=599</guid>
		<description><![CDATA[When creating Symfony 1.4 CLI tasks, I stumbled upon an error message:
The "default" context does not exist.
After searching some old forums, I found a solution. Before you access any Doctrine class, you mus first bootstrap your context correctly. Here is an example:
$config = ProjectConfiguration::getApplicationConfiguration(
  'frontend',
  'dev',
   false
);
sfContext::createInstance($config);

The application name and the<div><a href="http://annafilina.com/blog/symfony-task-default-context/">Read the rest...</a></div><br />]]></description>
			<content:encoded><![CDATA[<p>When creating Symfony 1.4 CLI tasks, I stumbled upon an error message:</p>
<p><code>The "default" context does not exist.</code></p>
<p>After searching some old forums, I found a solution. Before you access any Doctrine class, you mus first bootstrap your context correctly. Here is an example:</p>
<pre class="brush:php">$config = ProjectConfiguration::getApplicationConfiguration(
  'frontend',
  'dev',
   false
);
<div id="_mcePaste">sfContext::createInstance($config);</div>
</pre>
<div>The application name and the environment can come from CLI options. More on Doctrine tasks (I could only find 1.2 equivalent): <a href="http://www.symfony-project.org/cookbook/1_2/en/tasks">http://www.symfony-project.org/cookbook/1_2/en/tasks</a></div>
]]></content:encoded>
			<wfw:commentRss>http://annafilina.com/blog/symfony-task-default-context/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Integrating Markdown with Symfony</title>
		<link>http://annafilina.com/blog/markdown-in-symfony/</link>
		<comments>http://annafilina.com/blog/markdown-in-symfony/#comments</comments>
		<pubDate>Mon, 25 Apr 2011 21:42:37 +0000</pubDate>
		<dc:creator>Anna</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://annafilina.com/blog/?p=580</guid>
		<description><![CDATA[I needed to create a help section in three languages in a Symfony 1.4 application. I wanted to make the technical writer's life as easy as possible and the source files easy to read for everyone. Markdown seemed like a good solution. Because Symfony can cache static pages, Markdown will only parse each page once. I did not have to worry about performance! Here is how to quickly add Markdown to your Symfony 1.4 application.

[...]]]></description>
			<content:encoded><![CDATA[<h3>Context</h3>
<p>I needed to create a number of static help pages in three languages in a Symfony 1.4 application. Using the XLIFF translation files seemed absurd, since I knew that I will include a lot of HTML. As you know, XLIFF translation files are XML, and so any HTML needs to be converted to entities, which makes maintenance a pain. Also, loading the entire manual&#8217;s XLIFF when requesting a single page is not optimal. And so, I decided to create partials using the following structure: _docs/{lang}/{title}.php. This method would organize my pages nicely and will only load what is needed.</p>
<p>Then, I remembered that we were planning to hire a technical writer for the rest of the manual. I wanted to make his life as easy as possible and the source files easy to read for everyone. I went that far; I might as well write the manual using Markdown. Because Symfony can cache static pages, Markdown will only parse each page once. I did not have to worry about performance! Here is how to quickly add Markdown to your Symfony 1.4 application.</p>
<h3>Solution</h3>
<ol>
<li><a href="http://michelf.com/projects/php-markdown/">Download the paser</a></li>
<li>Copy the PHP file to your lib/helper or apps/{application}/lib/helper directory</li>
<li>Rename the file to MarkdownHelper.php</li>
<li>In your controller, load the Partial helper: $this-&gt;getContext()-&gt;getConfiguration()-&gt;loadHelpers(array(&#8216;Partial&#8217;));</li>
<li>Load your partial: $this-&gt;content = get_partial(&#8216;{module}/{partial}&#8217;);</li>
<li>In your template, load the Markdown helper: &lt;?php use_helper(&#8216;Markdown&#8217;); ?&gt;</li>
<li>Parse and output: &lt;?php echo Markdown($content); ?&gt;</li>
</ol>
<h3>Notes</h3>
<p>Steps 4 and 5 can also be achieved on the template level as well.</p>
<p>The reason for calling the Markdown helper in the template and not in the action is due to Symfony&#8217;s output escaper (and also because presentation logic belongs in the View). By default, Symfony converts all HTML tags to entities, which is great for security, in case the input comes from an untrusted source. Had we parsed with Markdown at the controller level, you would have seen HTML tags in your browser. If, for any reason, you still wish to parse at the controller level, make sure to output using this code: $sf_data-&gt;getRaw(&#8216;content&#8217;);</p>
<p>Here is a link to short and comprehensive <a href="http://daringfireball.net/projects/markdown/syntax">Markdown Syntax Documentation</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://annafilina.com/blog/markdown-in-symfony/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Symfony &#8211; subfolders for partials</title>
		<link>http://annafilina.com/blog/symfony-subfolders-for-partials/</link>
		<comments>http://annafilina.com/blog/symfony-subfolders-for-partials/#comments</comments>
		<pubDate>Sat, 19 Feb 2011 23:41:37 +0000</pubDate>
		<dc:creator>Anna</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://annafilina.com/blog/?p=571</guid>
		<description><![CDATA[Symfony 1.2 &#8211; 1.4 expects all partials to follow this convention: templates/_partial.php
What happens when you need to organize your partials in subfolder? I tried a number of &#8220;Symfunky&#8221; avenues. Feel free to skip to the solution.
Avenues Explored
I first try the call the include_partial helper with &#8220;subfolder/partial&#8221;, but that results in Symfony attempting to find the<div><a href="http://annafilina.com/blog/symfony-subfolders-for-partials/">Read the rest...</a></div><br />]]></description>
			<content:encoded><![CDATA[<p>Symfony 1.2 &#8211; 1.4 expects all partials to follow this convention: templates/_partial.php</p>
<p>What happens when you need to organize your partials in subfolder? I tried a number of &#8220;Symfunky&#8221; avenues. Feel free to skip to the solution.</p>
<h3>Avenues Explored</h3>
<p>I first try the call the include_partial helper with &#8220;subfolder/partial&#8221;, but that results in Symfony attempting to find the partial in the &#8220;subfolder&#8221; module.</p>
<p>Alright, so I try &#8220;module/subfolder/partial&#8221;, but that results in Symfony looking for &#8220;_subfolder/partial&#8221; because it simply split at the first backslash. I don&#8217;t blame the framework developers: I am trying to do something it was not meant to do.</p>
<p>So now I realize that we can set any template from an action using $this-&gt;setTemplate(&#8217;subfolder/_partial&#8217;). Since actions are NOT partials by definition, I decide to use a component. Unfortunately the component doesn&#8217;t allow the developer to override templates.</p>
<p>I am starting to feel that the framework mocks me. So this is how you wanna play it, huh? I will override your sfView class, load it in factories.yml, and there&#8217;s nothing you can do about it (insert diabolical laughter)! But then, after almost half an hour, I realize that I&#8217;m trying to make it too elegant for something so basic as concatenating a few strings.</p>
<h3>Solution</h3>
<p>The solution ended up ridiculously simple and does not risk breaking any existing code.</p>
<p>1. Copy get_partial() helper with an extra param: get_partial_subfolder($templateName, $vars = array(), $subfolder)<br />
2. Edit the line that concatenates the file name: $actionName = $subfolder.&#8217;/_&#8217;.$templateName; (instead of &#8216;_&#8217;.$templateName)</p>
<p>There you go, no more headaches. Just remember to use &#8220;echo get_partial()&#8221; instead of &#8220;include_partial()&#8221; unless you want to override that helper as well. If you are unsure how to create custom helpers, see here under Adding Your Own Helpers: http://www.symfony-project.org/book/1_2/07-Inside-the-View-Layer</p>
]]></content:encoded>
			<wfw:commentRss>http://annafilina.com/blog/symfony-subfolders-for-partials/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Developer Community: Where to Start? &#8211; Part 1</title>
		<link>http://annafilina.com/blog/developer-community-where-to-start-part-1/</link>
		<comments>http://annafilina.com/blog/developer-community-where-to-start-part-1/#comments</comments>
		<pubDate>Fri, 12 Nov 2010 11:14:34 +0000</pubDate>
		<dc:creator>Anna</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://annafilina.com/blog/?p=517</guid>
		<description><![CDATA[I talked and listened much about the developer community in the past years. I have been actively involved in the community since 2006. The latest community panel at ZendCon 2010 inspired me to write this article. This is part 1 of a 2-part series.
You want to benefit from the community
So you have never been involved<div><a href="http://annafilina.com/blog/developer-community-where-to-start-part-1/">Read the rest...</a></div><br />]]></description>
			<content:encoded><![CDATA[<p>I talked and listened much about the developer community in the past years. I have been actively involved in the community since 2006. The latest community panel at ZendCon 2010 inspired me to write this article. This is part 1 of a 2-part series.</p>
<h3>You want to benefit from the community</h3>
<p>So you have never been involved with a developer community before. What is a community? How do you find one? What can the community do for you? There are as many answers as there are communities. Everybody runs it in his own way.</p>
<p>A developer community is a group of people that come together because they share a passion for development. Some are restricted to a city, like Montreal-Python, other to a province, like PHP Quebec, and some across many countries, like PHPBenelux. There is also the concept of a worldwide community, but we won&#8217;t go too far in this article.</p>
<p>Back to our city&#8230; how do you find a community near you? Try searching online for Programming Language + City or Province (PHP Quebec, for example). If there is one, you will surely get a hit. Hopefully they have an About page with a Mission statement. Many also have an event calendar, which will help you to dive right in.</p>
<p>Different events may include free presentations, gatherings at a pub, coding events and even top-notch international conferences. Start attending the events and talk to people. If you&#8217;re looking for a job or are hiring, don&#8217;t forget some business cards. These people may even one day become friends that you can count on. Some events, such as barbecues, welcome developers with their families. It&#8217;s a great way to enjoy a weekend with geeks and not feel guilty about it.</p>
<p>I find all these events to be a lot of fun.</p>
<h3>You want to help the community?</h3>
<p>Communities do not expect you to give anything in return. At least it&#8217;s not the way we run the PHP Quebec user group. However, if you enjoyed what the community gave you and feel that you can help in return, don&#8217;t hesitate to contact the people involved. I believe that having a strong community with many contributors is a long-term benefit. It may spread the adoption of your favorite technology and create jobs in that area.</p>
<p>When I began my involvement with PHP Quebec, there weren&#8217;t that many companies using PHP. Now, it has spread as far as the government, so there&#8217;s more job than I can handle.</p>
<p>There are infinite ways to help, so ask the leaders what they need. Is it programming skills to maintain the website? Is it making reservations for presentation venues? Maybe they need somebody to go buy the hot-dogs for this afternoon&#8217;s barbecue? The organizers will sure be happy to get any help and that will score you points in the community.</p>
<p>Other than points, you will eventually start getting visibility that you could not get otherwise. Visibility is basically how many people know your name and what you do. This means more job/contract offers. Also, hanging around all of these community leaders, you now have a lot of contacts in open source projects and/or IT companies. Networking never goes to waste.</p>
<h3>Wait, you didn&#8217;t find a community?</h3>
<p>Sometimes there is no community nearby. If that is the case, and (if I recall correctly) as Keith Casey said: &#8220;you&#8217;re it!&#8221; It may be time for you to start your own community. It will take time and sweat, but determination and guts will get you through. More on this topic in my next article.</p>
]]></content:encoded>
			<wfw:commentRss>http://annafilina.com/blog/developer-community-where-to-start-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ConFoo 2011: Call for Papers</title>
		<link>http://annafilina.com/blog/confoo-2010-call-for-papers/</link>
		<comments>http://annafilina.com/blog/confoo-2010-call-for-papers/#comments</comments>
		<pubDate>Thu, 11 Nov 2010 23:22:43 +0000</pubDate>
		<dc:creator>Anna</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Conference]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://annafilina.com/blog/?p=480</guid>
		<description><![CDATA[PHP Quebec and friends are pleased to announce the 2011 edition of the ConFoo.ca Conference. The Conference will take place in Montreal, Canada between March 9th and 11th. We are looking for speakers willing to share their expertise with PHP professionals and managers.
The Conference features technical one hour talks dedicated to many aspects of Web development such<div><a href="http://annafilina.com/blog/confoo-2010-call-for-papers/">Read the rest...</a></div><br />]]></description>
			<content:encoded><![CDATA[<p><a href="http://confoo.ca/en"><img class="size-full wp-image-356 alignleft" style="margin-right: 10px;" title="ConFoo.ca Web Techno Conference" src="http://annafilina.com/blog/wp-content/uploads/logo_confoo_300_95.gif" alt="" width="300" height="95" /></a>PHP Quebec and friends are pleased to announce the 2011 edition of the ConFoo.ca Conference. The Conference will take place in Montreal, Canada between March 9th and 11th. We are looking for speakers willing to share their expertise with PHP professionals and managers.</p>
<p>The Conference features technical one hour talks dedicated to many aspects of Web development such as mobile apps, security, databases, cloud, web standards, accessibility, project management, CMS &amp; frameworks, startups, Ruby, Python, .NET, Java and, of course, PHP.</p>
<p>Organizers will prioritize new and original topics in English or French. Please submit your papers before November 26th. For more information, visit the website: <a href="http://confoo.ca/en/call-for-papers">http://confoo.ca/en/call-for-papers</a></p>
]]></content:encoded>
			<wfw:commentRss>http://annafilina.com/blog/confoo-2010-call-for-papers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

