<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Tue, 21 May 2013 17:55:06 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Rob Allen: Injecting configuration into a ZF2 controller]]></title>
      <guid>http://www.phpdeveloper.org/news/19524</guid>
      <link>http://www.phpdeveloper.org/news/19524</link>
      <description><![CDATA[<p>
<i>Rob Allen</i> has a a new post to his site today showing you how to <a href="http://akrabat.com/zend-framework-2/injecting-configuration-into-a-zf2-controller/">inject configuration information</a> into a Zend Framework 2 controller via an interface and some initializer settings in the module setup.
</p>
<blockquote>
One thing you may find yourself needing to do is access configuration information in a controller or service class. The easiest way to do this is to use the ServiceManger's initialiser feature. This allows you to write one piece of injection code that can be applied to multiple objects. It's easier to show this in action!
</blockquote>
<p>
He includes a sample configuration file (with a setting for "setting_1") and the interface you implement to structure the load request. He then shows how to hook this into the controller and the code needed for the module "getControllerConfig" (or "getServiceConfig" for use with services) to load in the file and set it to the correct object.
</p>
Link: http://akrabat.com/zend-framework-2/injecting-configuration-into-a-zf2-controller]]></description>
      <pubDate>Tue, 30 Apr 2013 09:11:16 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[NetTuts.com: Testing Laravel Controllers]]></title>
      <guid>http://www.phpdeveloper.org/news/19499</guid>
      <link>http://www.phpdeveloper.org/news/19499</link>
      <description><![CDATA[<p>
NetTuts.com has posted a new article for the Laravel users out there - a tutorial showing how to <a href="http://net.tutsplus.com/tutorials/php/testing-laravel-controllers/">test Laravel controllers</a> via PHPUnit tests.
</p>
<blockquote>
Testing controllers isn't the easiest thing in the world. Well, let me rephrase that: testing them is a cinch; what's difficult, at least at first, is determining what to test. Should a controller test verify text on the page? Should it touch the database? Should it ensure that variables exist in the view? If this is your first hay-ride, these things can be confusing! Let me help.
</blockquote>
<p>
They break up the testing process into three main chunks - isolation of the tests (mocking where need be), calling the controller method and running the checks (assertions) to be sure the result is valid. They start with a basic controller test that runs a GET request on the "posts" method. They also mention the assertion helper methods included with Laravel controller testing, things like "assertRedirectedTo" and "assertSessionHas". The article then gets into moreo practical examples showing a TDD approach to testing some simple controller calls, mocking data connections, handling redirects and repositories.
</p>
Link: http://net.tutsplus.com/tutorials/php/testing-laravel-controllers]]></description>
      <pubDate>Wed, 24 Apr 2013 09:24:06 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHP Podcast: Episode #2 - Adam Culp]]></title>
      <guid>http://www.phpdeveloper.org/news/19496</guid>
      <link>http://www.phpdeveloper.org/news/19496</link>
      <description><![CDATA[<p>
The PHP Podcast (from <a href="http://zend.com">Zend</a>) has posted its second episode - <a href="http://phppodcast.com/episode-2-adam-culp/">Episode #2</a>, an interview with <i>Adam Culp</i> who recently joined the team at Zend and is a organizer for the South Florida PHP User Group.
</p>
<blockquote>
In this episode we talk to Adam Culp on his very first day as a Zend employee. We talk about PHP community and Adam's decision to move from the realm of independent consultant to Zender! Adam is the organizer of <a href="http://sunshinephp.com/">SunshinePHP</a>, PHP Guru and joining the Zend Professional Services Team.
</blockquote>
<p>
You can listen to this latest episode either through the <a href="http://phppodcast.com/episode-2-adam-culp/">in-page player</a> or by <a href="http://phppodcast.com/wp-content/uploads/2013/04/TPHPP_002_Adam_Culp_April2013.mp3">downloading the mp3</a> directly. You can also <a href="http://phppodcast.com/feed/">subscribe to their feed</a> of you want this and future episodes pulled automatically.
</p>
Link: http://phppodcast.com/episode-2-adam-culp/]]></description>
      <pubDate>Tue, 23 Apr 2013 10:47:38 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[7PHP.com: Zend Certifications Tips & Tricks - Hear It From Zend Certified Engineer Eric Hogue]]></title>
      <guid>http://www.phpdeveloper.org/news/19492</guid>
      <link>http://www.phpdeveloper.org/news/19492</link>
      <description><![CDATA[<p>
On 7PHP.com there's a new post that interviews a PHP community member, <i>Eric Hogue</i>, about <a href="http://7php.com/zend-certification-advice-eric-hogue/">his experience with the Zend Certified Engineer exam</a>.
</p>
<blockquote>
This is the 3rd set of <a href="http://7php.com/category/zend-certification-tips/">Zend Certification Tips and Advice</a> to help anyone taking either of the two Zend Exams powered by <a href="http://en.wikipedia.org/wiki/Zend_Technologies">Zend Technologies</a>: the Zend PHP Certification Exam and/or the Zend Framework Certification Exam. The aim being to help people who want to sit for those exams and inform them what it is all about & what to expect by <a href="http://7php.com/category/expert-php-advice/">hearing it from (pro) PHP Guys</a> who have already been through it, that is => Hear It From Zend Certified Engineers!
</blockquote>
<p>
He starts off with some general questions to <i>Eric</i> about the exam and its structure and how he prepared himself for it. He mentions some of the resources he used to study and what kind of topics to pay attention to. There's also a few quotes included at the end giving <a href="http://penguindreams.org/blog/disappointe-with-zends-php5-certification">another perspective</a> on the exam (specifically, some frustrations).
</p>
Link: http://7php.com/zend-certification-advice-eric-hogue]]></description>
      <pubDate>Mon, 22 Apr 2013 12:16:25 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Reddit.com: Dependency injection in ZF2 and Symfony 2 are service locators]]></title>
      <guid>http://www.phpdeveloper.org/news/19468</guid>
      <link>http://www.phpdeveloper.org/news/19468</link>
      <description><![CDATA[<p>
On Reddit's PHP section there's a discussion happening about <a href="http://www.reddit.com/r/PHP/comments/1caidn/dependency_injection_in_zf2_and_symfony_2_are/"> dependency injection versus service locators</a> in two popular PHP frameworks - Zend Framework 2 and Symfony 2 (and how they're not really DI at all).
</p>
<blockquote>
Both ZF2 and Symfony 2 offer the same behavior: if I'm in a controller, and I want to use a service, I have to get it from the container with $this->get('my_service').
As such, the controller is not using DI, this is the service locator pattern. Controllers become more difficult to tests because of that, and they depend on the container now. I wonder why both frameworks didn't go further: why not treat controllers like services and use dependency injection on them. In other words: if a controller needs a service "A", then it should get it in the constructor, or through setter/property injection.
</blockquote>
<p>
The <a href="http://www.reddit.com/r/PHP/comments/1caidn/dependency_injection_in_zf2_and_symfony_2_are/">comments</a> talk some about the "controller from the DI container" idea, some other ways around the problem and some clarification as to what the frameworks are actually doing related to the container injection.
</p>
Link: http://www.reddit.com/r/PHP/comments/1caidn/dependency_injection_in_zf2_and_symfony_2_are]]></description>
      <pubDate>Tue, 16 Apr 2013 12:40:07 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[NetTuts.com: Taming Slim 2.0]]></title>
      <guid>http://www.phpdeveloper.org/news/19396</guid>
      <link>http://www.phpdeveloper.org/news/19396</link>
      <description><![CDATA[<p>
On NetTuts.com today there's a new tutorial posted about <a href="http://net.tutsplus.com/tutorials/php/taming-slim-2-0/">"taming" Slim 2.0</a>, the latest version of the popular PHP microframework. They look at application structure and share some tips to using this update.
</p>
<blockquote>
<a href="http://www.slimframework.com/">Slim</a> is a lightweight framework that packs a lot of punch for its tiny footprint. It has an incredible routing system, and offers a solid base to work from without getting in your way. Let me show you! But that's not to say that Slim doesn't has some issues; it's one-file setup becomes cluttered as your application grows. In this article, we'll review how to structure a Slim application to not only sustain, but improve its functionality and keep things neat and systematic.
</blockquote>
<p>
He starts with an example of "vanilla Slim" and looks some at what's happening behind the scenes in the routing engine. They then give you a step by step installation and usage guide including updating the router to use class files. An example controller is included as well as some basic error handling using a Twig template for use across the application.
</p>]]></description>
      <pubDate>Tue, 02 Apr 2013 09:17:11 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHP Podcast: Episode #1 - Cal Evans]]></title>
      <guid>http://www.phpdeveloper.org/news/19385</guid>
      <link>http://www.phpdeveloper.org/news/19385</link>
      <description><![CDATA[<p>
The <a href="http://phppodcast.com/episode-1-cal-evans/">first episode</a> of a new PHP-related podcast, the "PHP Podcast" produced by <a href="http://zend.com">Zend</a>, has been released. This first episode, hosted by <i>Joe Stagner</i> features a well-known PHPer, <i>Cal Evans</i>.
</p>
<blockquote>
Cal Evans has been referred to as "The Ubiquitous Face of the PHP Community". That's made Cal an obvious choice for the first guest on the PHPPodcast. In this episode we chat about the evolving face of the PHP community.
</blockquote>
<p>
You can listen to this latest episode either through the <a href="http://phppodcast.com/episode-1-cal-evans/">in-page player</a>, by <a href="http://phppodcast.com/wp-content/uploads/2013/03/TPHPP_001_Cal_Evans.mp3">downloading the mp3</a> or by <a href="http://phppodcast.com/feed/">subscribing to their feed</a>.
</p>]]></description>
      <pubDate>Fri, 29 Mar 2013 12:38:30 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: The MVC Pattern and PHP, Part 2]]></title>
      <guid>http://www.phpdeveloper.org/news/19302</guid>
      <link>http://www.phpdeveloper.org/news/19302</link>
      <description><![CDATA[<p>
PHPMaster.com has posted the <a href="http://phpmaster.com/the-mvc-pattern-and-php-2/">second part of their MVC series</a>, introducing you to the Model/View/Controller design pattern. If you want to catch up, part one <a href="http://phpmaster.com/the-mvc-pattern-and-php-1/">is here</a>.
</p>
<blockquote>
Welcome to part 2 of this two-part series discussing MVC and PHP, where we'll discuss some of the considerations one must make when using an MVC architecture. If you've come straight to this article without reading part 1 first, I encourage you to head back and have careful read as this one will assume that you've read and understand everything it discussed.
</blockquote>
<p>
He talks about some of the things more involved in making a MVC framework including routing and URL formats and working with templates. Sample code is included for the route handling, model/controller relationship and view classes for the templates.
</p>]]></description>
      <pubDate>Tue, 12 Mar 2013 11:19:03 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: The MVC Pattern and PHP, Part 1]]></title>
      <guid>http://www.phpdeveloper.org/news/19274</guid>
      <link>http://www.phpdeveloper.org/news/19274</link>
      <description><![CDATA[<p>
If you're new to the world of PHP frameworks, there's one acronym that might confuse you if you don't understand the structure - MVC. In <a href="http://phpmaster.com/the-mvc-pattern-and-php-1">this new tutorial</a> on PHPMaster.com today introduces you to the MVC (Model/View/Controller) design pattern and how it's commonly implemented in PHP.
</p>
<blockquote>
The Model-View-Control (MVC) pattern, originally formulated in the late 1970s, is a software architecture pattern built on the basis of keeping the presentation of data separate from the methods that interact with the data. In theory, a well-developed MVC system should allow a front-end developer and a back-end developer to work on the same system without interfering, sharing, or editing files either party is working on. [...] In this article, I will go the basic principles of MVC, a run through the definition of the pattern and a quick example of MVC in PHP. This is definitely a read for anyone who has never coding with MVC before or those wanting to brush up on previous MVC development skills.
</blockquote>
<p>
He starts with an introduction of the overall structure of the pattern, how each part talks with the others. He then talks about each piece in a bit more detail and provides some code examples for some very basic MVC classes. There's no routing or anything connected to them like there would be in a framework - it's just the classes taking the others in as parameters.
</p>]]></description>
      <pubDate>Tue, 05 Mar 2013 13:21:32 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[7PHP.com: Zend Certification Tips & Tricks, Hear It From Zend Certified Engineer Lorna Jane Mitchell]]></title>
      <guid>http://www.phpdeveloper.org/news/19163</guid>
      <link>http://www.phpdeveloper.org/news/19163</link>
      <description><![CDATA[<p>
7PHP.com has posted a new article where they asked <i>Lorna Mitchell</i> for <a href="http://7php.com/zend-certification-advice-lorna-mitchell/">some of her advice</a> for those wanting to take the Zend Certified Engineer exam, including what the test is like and how you can prepare effectively.
</p>
<blockquote>
This is the 2nd set of <a href="http://7php.com/category/zend-certification-tips/">Zend Certification Tips and Advice</a> to help anyone taking either of the two Zend Exams powered by <a href="http://en.wikipedia.org/wiki/Zend_Technologies">Zend Technologies</a>: the Zend PHP Certification Exam and/or the Zend Framework Certification Exam. The aim being to help people who want to sit for those exams and inform them what it is all about & what to expect by <a href="http://7php.com/category/expert-php-advice/">hearing it from (pro) PHP Guys</a> who have already been through it, that is => Hear It From Zend Certified Engineers!
</blockquote>
<p>
They start with a little background on her and her experience with PHP and get quickly into the questions about the exam. Topics include things like:
</p>
<ul>
<li>What the test is about and hopes to achieve
<li>Some things you can do to prepare
<li>A recommendation to make the most of your time exploring topics you might be weak in
<li>Whether or not the ZCE training classes help in the learning process
</ul>
<p>
You can read the rest of the interview <a href="http://7php.com/zend-certification-advice-lorna-mitchell/">here</a>.
</p>]]></description>
      <pubDate>Mon, 11 Feb 2013 10:26:42 -0600</pubDate>
    </item>
  </channel>
</rss>
