<?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>Sun, 12 Feb 2012 20:01:52 -0600</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Rob Allen's Blog: One-to-Many Joins with Zend_Db_Table_Select]]></title>
      <guid>http://www.phpdeveloper.org/news/17515</guid>
      <link>http://www.phpdeveloper.org/news/17515</link>
      <description><![CDATA[<p>
<i>Rob Allen</i> has a tip for the Zend Framework users out there using the Zend_Db module to connect to their database resources - how to do a <a href="http://akrabat.com/zend-framework/one-to-many-joins-with-zend_db_table_select/">one to many join</a> with the help of Zend_Db_Table_Select (easier than it sounds).
</p>
<blockquote>
Let's say that you want to set up a one-to-many relationship between two tables: Artists and Albums because you've refactored my <a href="http://akrabat.com/zend-framework-tutorial">ZF1 tutorial</a>. [...] Assuming you're using Zend_Db_Table, the easiest way is to turn off the integrity check and do a join in a mapper or table method.
</blockquote>
<p>
He includes a few lines of source to illustrate, calling the "setIntegrityCheck" value to "false" to tell ZF not to worry about the additional join value over to the artists table. The result is a new column value with the artist's name instead of just the ID.
</p>]]></description>
      <pubDate>Wed, 08 Feb 2012 09:28:20 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Under the Hood of Yii's Component Architecture, Part 2]]></title>
      <guid>http://www.phpdeveloper.org/news/17510</guid>
      <link>http://www.phpdeveloper.org/news/17510</link>
      <description><![CDATA[<p>
Following up on their <a href="http://phpdeveloper.org/news/17472">previous look</a> at the component architecture of the Yii framework, PHPMaster has posted <a href="http://phpmaster.com/yii-under-the-hood-2">this new tutorial</a> showing how the framework allows you to do some event-based programming.
</p>
<blockquote>
An application event is something that occurs which might be of interest to other bits of code. A standard event in most GUI applications would be a "click" event, but the sky's the limit and what events you define is really up to you. [...] The details can be provided by application-specific modules allowing you to keep individual requirements separate from your reusable code. Events allow you to attach a potentially unlimited amount of functionality without changing your core modules and components.
</blockquote>
<p>
In his example, he shows how to create an event handler that is triggered when the user registers on the site. This event (CEvent) is then registered with the system and is attached via a call in the controller's "init" method.
</p>]]></description>
      <pubDate>Tue, 07 Feb 2012 11:53:57 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Under the Hood of Yii's Component Architecture, Part 1]]></title>
      <guid>http://www.phpdeveloper.org/news/17472</guid>
      <link>http://www.phpdeveloper.org/news/17472</link>
      <description><![CDATA[<p>
On PHPMaster.com today <i>Steven O'Brien</i> takes a look at a popular PHP-based framework, <a href="http://www.yiiframework.com/">Yii</a> - specifically one of the components that makes it up, the <a href="http://www.yiiframework.com/doc/api/1.1/CComponent">CComponent</a> that provides a base for all other components in the framework.
</p>
<blockquote>
There's been a lot of buzz surrounding the use of frameworks for quite a while now and there are many great PHP frameworks to choose from. I was blown away by the simplicity and power of the base <a href="http://www.yiiframework.com/doc/api/1.1/CComponent">CComponent</a> class in the Yii framework. [...] Every class in the framework extends from the CComponent class, which means that all subclasses work as components and can raise and handle events as well as be reusable and configurable. This packs a lot of punch for such a little class!
</blockquote>
<p>
In this first post of the series, he looks at how this base class lets you work with class properties using the magic getters and setters. He includes some code showing how to set them up and how to use it to configure your object by passing in other component and their configuration.
</p>]]></description>
      <pubDate>Tue, 31 Jan 2012 11:19:47 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Fabien Potencier's Blog: Create your own framework... on top of the Symfony2 Components (part 12)]]></title>
      <guid>http://www.phpdeveloper.org/news/17445</guid>
      <link>http://www.phpdeveloper.org/news/17445</link>
      <description><![CDATA[<p>
In <a href="http://fabien.potencier.org/article/62/create-your-own-framework-on-top-of-the-symfony2-components-part-12">this final post</a> of his series about building a framework on Symfony2 components, <i>Fabien Potencier</i> focuses again on flexibility - allowing you to have more than one front controller with different configurations thanks to dependency injections.
</p>
<blockquote>
Does it means that we have to make a choice between flexibility, customization, ease of testing and not having to copy and paste the same code into each application front controller? As you might expect, there is a solution. We can solve all these issues and some more by using the Symfony2 dependency injection container.
</blockquote>
<p>
The Symfony2 DIC (DependencyInjection) allows you to create a container with the objects and settings that you want and inject that into the main "Framework" class for its use. He registers most of the components he's added over the series like the UrlMatcher, RouterListener, ExceptionListener, EventDispatcher and the Framework class itself. This is all stored in a separate file(s) and can be conditionally included based on your environment. He shows how to register a custom listener, add parameters to the DIC configuration.
</p>]]></description>
      <pubDate>Wed, 25 Jan 2012 08:36:48 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Fabien Potencier's Blog: Create your own framework... on top of the Symfony2 Components (part 11)]]></title>
      <guid>http://www.phpdeveloper.org/news/17440</guid>
      <link>http://www.phpdeveloper.org/news/17440</link>
      <description><![CDATA[<p>
In <a href="http://fabien.potencier.org/article/60/create-your-own-framework-on-top-of-the-symfony2-components-part-11">part eleven</a> of his "Build a Framework on top of Symfony2", <i>Fabien Potencier</i> improves on his earlier versions of the code by adding in the HttpKernel support for handling events and errors that might come up in the application.
</p>
<blockquote>
If you were to use our framework right now, you would probably have to add support for custom error messages. Right now, we have 404 and 500 error support but the responses are hardcoded in the framework itself. Making them customizable is easy enough though: dispatch a new event and listen to it. Doing it right means that the listener has to call a regular controller. But what if the error controller throws an exception? You will end up in an infinite loop. There should be an easier way, right?
</blockquote>
<p>
Using the "RouterListener" functionality, he sets up an "ExceptionListener" and points that to an error handling controller with its own "exceptionAction". This action takes the exception information and displays a "Something went wrong!" message along with the details. He also includes an update to the Response handling to allow for returning a string back from the controller instead of a Response object.
</p>]]></description>
      <pubDate>Tue, 24 Jan 2012 11:04:44 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Fabien Potencier's Blog: Create your own framework... on top of the Symfony2 Components (part 6)]]></title>
      <guid>http://www.phpdeveloper.org/news/17391</guid>
      <link>http://www.phpdeveloper.org/news/17391</link>
      <description><![CDATA[<p>
In the <a href="http://fabien.potencier.org/article/55/create-your-own-framework-on-top-of-the-symfony2-components-part-6">sixth part of his series</a> on creating a custom framework on top of the Symfony2 components, <i>Fabien Potencier</i> looks at how to improve the previous examples by swapping out the more procedural controllers with actual classes.
</p>
<blockquote>
The move is pretty straightforward and makes a lot of sense as soon as you create more pages but you might have noticed a non-desirable side-effect... The LeapYearController class is always instantiated, even if the requested URL does not match the leap_year route. This is bad for one main reason: performance wise, all controllers for all routes must now be instantiated for every request. It would be better if controllers were lazy-loaded so that only the controller associated with the matched route is instantiated.
</blockquote>
<p>
To help solve the issue, he uses the HttpKernel component and its "controller resolver" to figure out how to call the controller and pass it the correct parameters, but only when needed. A resolver object is created and that is used to instantiate the controller object. Sample "action" calls are included to fill out the basic controller (his "leap year" example) and the full resulting code is included both for the framework and the new object oriented controller.
</p>]]></description>
      <pubDate>Fri, 13 Jan 2012 11:08:12 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Fabien Potencier's Blog: Create your own framework... on top of the Symfony2 Components (part 1)]]></title>
      <guid>http://www.phpdeveloper.org/news/17343</guid>
      <link>http://www.phpdeveloper.org/news/17343</link>
      <description><![CDATA[<p>
<i>Fabien Potencier</i> has written up a new post on his blog talking about <a href="http://fabien.potencier.org/article/50/create-your-own-framework-on-top-of-the-symfony2-components-part-1">creating your own framework</a> layered on top of the Symfony2 framework's component system (yes, a framework from a framework).
</p>
<blockquote>
Symfony2 is a reusable set of standalone, decoupled, and cohesive PHP components that solve common web development problems. Instead of using these low-level components, you can use the ready-to-be-used Symfony2 full-stack web framework, which is based on these components... or you can create your very own framework. This series is about the latter.
</blockquote>
<p>
He talks about the reasoning behind wanting to make your own framework, mostly dealing with exploration and/or proving you can do it. He walks you through every step of the way - creating the base directory, setting up a project via <a href="http://packagist.org/about-composer">Composer</a>, creating an autoloader and making a first basic file - a "Hello world" echo message. In the next part of the series, he'll add in the HttpFoundation component for web interaction.
</p>]]></description>
      <pubDate>Wed, 04 Jan 2012 08:47:39 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Stuart Herbert's Blog: Installing Phix on Various OSes (OSX, Debian, Ubuntu, Fedora)]]></title>
      <guid>http://www.phpdeveloper.org/news/16939</guid>
      <link>http://www.phpdeveloper.org/news/16939</link>
      <description><![CDATA[<p>
<i>Stuart Herbert</i> has put together a series of posts detailing how to get the <a href="http://phix-project.org/">Phix</a> component creation and management tool installed on various operating systems.
</p>
<blockquote>
Phix makes it extremely easy to create and maintain your own PEAR-installer compatible components for reuse in your PHP applications. Installation takes just seconds, and it's both open-source and framework-agnostic!
</blockquote>
<p>The OS guides help you get it installed for:</p>
<ul>
<li><a href="http://blog.stuartherbert.com/php/2011/10/02/php-components-installing-phix-on-osx/">OSX</a>
<li><a href="http://blog.stuartherbert.com/php/2011/10/01/php-components-installing-phix-on-fedora/">Fedora</a>
<li><a href="http://blog.stuartherbert.com/php/2011/10/01/php-components-installing-phix-on-ubuntu/">Ubuntu</a>
<li><a href="http://blog.stuartherbert.com/php/2011/10/03/php-components-installing-phix-on-debian/">Debian</a>
<li><a href="http://blog.stuartherbert.com/php/2011/10/03/php-components-installing-phix-on-centos/">CentOS</a>
</ul>
<p>
For more information about Phix (including helpful "getting started" details) check out <a href="http://phix-project.org/">the project's website</a>.
</p>]]></description>
      <pubDate>Mon, 03 Oct 2011 10:02:58 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[King Foo Blog: Using Complex Type with Zend_Soap]]></title>
      <guid>http://www.phpdeveloper.org/news/16897</guid>
      <link>http://www.phpdeveloper.org/news/16897</link>
      <description><![CDATA[<p>
New from the King Foo blog there's a tutorial showing how to use <a href="http://www.king-foo.be/2011/09/using-complex-types-with-zend_soap/">complex types in a SOAP request with Zend_Soap</a>, a component of the <a href="http://framework.zend.com">Zend Framework</a>.
</p>
<blockquote>
To be able to use complex types with Soap requests, they need to be fully defined in the WSDL file. Zend_Soap can automate this process, if you know how to define those complex types. Let us start without it Zend_Soap's magic and compare it with a fully discovered complex request type afterwards.
</blockquote>
<p>
In their example, they have a collection of books (objects) that they want to send over to the web service. The code for both the server and client side are included with the WSDL automagically created by the Zend_Soap_Server component. By setting docblock comments on the properties of the Book objects, the SOAP components automatically know what types they are. Their example defines these, and sets up the web service on the other side with a classmap to define where the "tags" information for each book lies.
</p>]]></description>
      <pubDate>Fri, 23 Sep 2011 08:37:10 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Matthew Weier O'Phinney's Blog: Using the ZF2 EventManager]]></title>
      <guid>http://www.phpdeveloper.org/news/16850</guid>
      <link>http://www.phpdeveloper.org/news/16850</link>
      <description><![CDATA[<p>
<i>Matthew Weier O'Phinney</i>, lead on the <a href="http://framework.zend.com">Zend Framework</a> project, has a new post to his blog talking about the <a href="http://weierophinney.net/matthew/archives/266-Using-the-ZF2-EventManager.html">event manager in the Zend Framework, v2</a> and how to use it in a refectored version of a <a href="http://weierophinney.net/matthew/archives/251-Aspects,-Filters,-and-Signals,-Oh,-My!.html">previous post</a>.
</p>
<blockquote>
Earlier this year, I <a href="http://weierophinney.net/matthew/archives/251-Aspects,-Filters,-and-Signals,-Oh,-My!.html">wrote about Aspects, Intercepting Filters, Signal Slots, and Events</a>, in order to compare these similar approaches to handling both asychronous programming as well as handling cross-cutting application concerns in a cohesive way. I took the research I did for that article, and applied it to what was then a "SignalSlot" implementation within Zend Framework 2, and refactored that work into a new "EventManager" component. This article is intended to get you up and running with it.
</blockquote>
<p>
You'll need to already have an install of the Zend Framework (v2) installed to follow along. He covers some of the basic terminology and the base code the rest of the tutorial's built from - a simple EventManager instance with a trigger on it. He moves on from there showing how to specify targets for the triggers, setting up global static listeners and listener aggregates as well as how to short circuit listener execution. He wraps up the post by applying all of the examples into one simple caching tool that responds to the trigger by either sending back a new instance or pulling the previously generated one from the cache.
</p>]]></description>
      <pubDate>Tue, 13 Sep 2011 09:25:32 -0500</pubDate>
    </item>
  </channel>
</rss>

