<?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>Wed, 19 Jun 2013 04:40:56 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Joshua Thijssen: Custom symfony2 config loader]]></title>
      <guid>http://www.phpdeveloper.org/news/19111</guid>
      <link>http://www.phpdeveloper.org/news/19111</link>
      <description><![CDATA[<p>
In <a href="http://www.adayinthelifeof.nl/2013/01/30/custom-symfony2-config-loader/">his latest post</a> <i>Joshua Thjissen</i> looks at the creation of a custom configuration loader for a Symfony2 application. This kind of thing is mostly useful for parsing configurations that Symfony2 doesn't already know how to parse.
</p>
<blockquote>
It happens more and more: large projects where your symfony2 site is just a small part in the big picture. Lots of additional components might even play a bigger part, especially when you are dealing with asynchronous components  which are connected through message queues for instance. [...] Our first idea is obvious: symfony2 uses by default a parameters.yml file, which gets imported by your configuration (config.yml) [...] So nothing new here and this setup works perfectly, provided that your symfony2 project is the ONLY thing that needs to be configured. As soon as you add multiple other components (like gearman or activemq workers that need to connect to solr too), they need to share this configuration. 
</blockquote>
<p>
His solution involves falling back to the INI-file format that's known as useful for several different languages and tools. Because of how Symfony2 reads these files though (only looking for "parameters") he's had to create a "ConfFileLoader" instance of the "FileLoader" that uses the <a href="http://php.net/parse_ini_file"> parse_ini_file</a> method to parse the data and return it back to the main container as parameters. He also includes the code/config you'll need to implement this custom loader into your application.
</p>]]></description>
      <pubDate>Wed, 30 Jan 2013 11:51:47 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Joshua Thijssen's Blog: Symfony2: Implementing ACL rules in your Data Fixtures]]></title>
      <guid>http://www.phpdeveloper.org/news/18175</guid>
      <link>http://www.phpdeveloper.org/news/18175</link>
      <description><![CDATA[<p>
<i>Joshua Thijssen</i> has a new post to his blog looking at a method for <a href="http://www.adayinthelifeof.nl/2012/07/04/symfony2-implementing-acl-rules-in-your-data-fixtures/">setting up ACL rules in fixtures</a> for your Symfony2-based applications.
</p>
<blockquote>
Doctrine's DataFixtures are a great way to add test data to your application. It's fairly easy to get this going: Create a fixureLoader that extends DoctrineCommonDataFixturesAbstractFixture, had a load() method and off you go. However, sometimes you want your data also to be protected by Symfony 2&#8242;s ACL layer. Since there isn't a common way to do this, here is one way on how I implemented this.
</blockquote>
<p>
His method uses the ContainerAware interface on the fixture loader instance to be able to get at the container for the fixture. This allows you to use the usual ACL handling methods of the framework to provide restrictions based on things like usernames and roles.
</p>]]></description>
      <pubDate>Wed, 04 Jul 2012 16:33:23 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Refulz.com: CakePHP evolves to 2.0]]></title>
      <guid>http://www.phpdeveloper.org/news/17517</guid>
      <link>http://www.phpdeveloper.org/news/17517</link>
      <description><![CDATA[<p>
On the Refulz.com blog there's a new post looking at <a href="http://php.refulz.com/cakephp-evolves-to-2/">some of the new features in CakePHP 2.0</a> including its use of lazy loading, the CakeEmail library and the new class loader.
</p>
<blockquote>
With CakePHP 2.0, they have dropped support for PHP 4 and have refactored the library code to make it strictly complaint with PHP 5.2+. Modeled on Ruby on Rails (RoR), CakePHP is a tough competition to Zend framework, Symfony and CodeIgniter.
</blockquote>
<p>
Besides the topics mentioned above, he also goes into the details of the new CakeRequest and CakeResponse models (to access information about teh current request/response). Summaries of all of the new functionality are provided along with some sample code where needed to illustrate.
</p>]]></description>
      <pubDate>Wed, 08 Feb 2012 11:15:43 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Jamie Rumbelow's Blog: Wrap me up and put me in a box]]></title>
      <guid>http://www.phpdeveloper.org/news/14324</guid>
      <link>http://www.phpdeveloper.org/news/14324</link>
      <description><![CDATA[<p>
<i>Jamie Rumbelow</i>, a member of the <a href="http://www.codeigniter.com">CodeIgniter</a> community, has a new post about a feature of the upcoming <a href="http://bitbucket.org/ellislab/codeigniter">CodeIgniter 2.0</a> version of the framework - <a href="http://jamieonsoftware.com/blog/entry/wrap-me-up-and-put-me-in-a-box">code packages</a>.
</p>
<blockquote>
This opens so many doors to developers, because, finally, we can bundle repeated functionality inside a package and distribute it as open-source or free code. Even if you don't want to expose your own packages, you can re-use them internally, which makes for a veritable mix of both writing application specific code, and abstracting elements of those applications out (such as an authentication engine, for instance) to become re-usable and unspecific. 
</blockquote>
<p>
He uses the post to give more specifics (that are currently missing from the manual) on what these packages are, how to use them via the framework's loader to both add and remove. Then, classes inside the package can be loaded just like any other CodeIgniter resource.
</p>
]]></description>
      <pubDate>Fri, 09 Apr 2010 08:09:41 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Working Out of the Object Context to Build Loader Apps in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/12761</guid>
      <link>http://www.phpdeveloper.org/news/12761</link>
      <description><![CDATA[<p>
New on DevShed there's <a href="http://www.devshed.com/c/a/PHP/Working-Out-of-the-Object-Context-to-Build-Loader-Apps-in-PHP">the latest part</a> of a series of tutorials they've written up (fifth of eight) about building automatic loading functionality into your applications. This time they change up their class to make the their loading function accessible outside of a class object.
</p>
<blockquote>
To avoid an eventual (and unnecessary) instantiation of the loader class, it would be helpful to declare the mentioned "load()" method static. Thus, bearing in mind this important concept, in this fifth part of the series I'm going to enhance the signature of the "Loader" class created previously by turning its loading method into a static one. 
</blockquote>
<p>
They <a href="http://www.devshed.com/c/a/PHP/Working-Out-of-the-Object-Context-to-Build-Loader-Apps-in-PHP/2/">change the definition</a> of the function to be "public static" making it callable both through the "self" keyword and outside the class with the "::" operator.
</p>]]></description>
      <pubDate>Fri, 26 Jun 2009 07:56:54 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Developing a Recursive Loading Class for Loader Applications in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/12709</guid>
      <link>http://www.phpdeveloper.org/news/12709</link>
      <description><![CDATA[<p>
DevShed has posted <a href="http://www.devshed.com/c/a/PHP/Developing-a-Recursive-Loading-Class-for-Loader-Applications-in-PHP/?kc=rss">part three</a> of their series looking at loader applications in PHP using the __autoload magic method.
</p>
<blockquote>
While this file loading class in its current incarnation does a pretty good job, it lacks an important feature that could be added with relative ease. It cannot perform a recursive search through the web server's file system, and afterward include a specified file within a given application.
</blockquote>
<p>
This article updates their class with <a href="http://www.devshed.com/c/a/PHP/Developing-a-Recursive-Loading-Class-for-Loader-Applications-in-PHP/3/">a new feature</a> to let the script looking for files recursively in a directory.
</p>]]></description>
      <pubDate>Thu, 18 Jun 2009 10:27:08 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Including Files Recursively with Loader Applications in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/12666</guid>
      <link>http://www.phpdeveloper.org/news/12666</link>
      <description><![CDATA[<p>
DevShed continues their "loaders in applications" series with <a href="http://www.devshed.com/c/a/PHP/Including-Files-Recursively-with-Loader-Applications-in-PHP">this fourth part</a>, a look at including files recursively.
</p>
<blockquote>
This series uses a variety of code samples to teach you how to create modular programs. These programs are capable of recursively including files required by a given application, without having to explicitly call any "include()/include_once()" or "require()/require_once()" PHP function.
</blockquote>
<p>
In <a href="http://www.devshed.com/c/a/PHP/Including-Files-Recursively-with-Loader-Applications-in-PHP/2/">their example</a> they show how to use their loader class (built up from previous parts of the series) and modify it slightly to allow the script to set the file path, set the files to include and pull them in.
</p>]]></description>
      <pubDate>Thu, 11 Jun 2009 12:43:23 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Using Static Methods to Build Loader Apps in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/12624</guid>
      <link>http://www.phpdeveloper.org/news/12624</link>
      <description><![CDATA[<p>
Continuing their look at static methods in PHP, DevShed has posted <a href="http://www.devshed.com/c/a/PHP/Using-Static-Methods-to-Build-Loader-Apps-in-PHP">this new tutorial</a> (the second in the series) focusing on using the methods to create a simple loader application.
</p>
<blockquote>
As its name suggests, a file loading program (or a resource loading program, to express the concept more accurately), is simply a PHP module that takes care of including, usually via its set of "include()/require() native functions, files that are required by an application to make it work as expected. [...] It's worthwhile to mention, however, that it was necessary to create an instance of the aforementioned class to load a determined file. This is a process that can be completely avoided in terms of good coding habits. But how can this be achieved? Well, it's feasible to statically call the class's load()" method,  preventing its unwanted instantiation.
</blockquote>
<p>
The <a href="http://www.devshed.com/c/a/PHP/Using-Static-Methods-to-Build-Loader-Apps-in-PHP/2/">code examples</a> of the simple loader class (a require_once wrapped in a try/catch) and a usage example.
</p>]]></description>
      <pubDate>Thu, 04 Jun 2009 10:27:42 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Building Loader Apps in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/12584</guid>
      <link>http://www.phpdeveloper.org/news/12584</link>
      <description><![CDATA[<p>
In <a href="http://www.devshed.com/c/a/PHP/Building-Loader-Apps-in-PHP">this first part of a new series</a> in application development, DevShed looks at building a loader for various resources inside your app.
</p>
<blockquote>
Loading sources on the fly is one of the most common tasks that PHP programmers have to tackle during the development of web applications. This typical situation must be faced independently of the scale of the programs being created. This means a loader mechanism must be developed.
</blockquote>
<p>
Their <a href="http://www.devshed.com/c/a/PHP/Building-Loader-Apps-in-PHP/2/">basic loader class</a> uses a call to a load() method to do two things - check to ensure that a file exists and, if it does, include it (technically a require_once). They also put a bit of exception handling around it to help catch any errors thrown on the include.
</p>]]></description>
      <pubDate>Thu, 28 May 2009 09:37:51 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHP 10.0 Blog: Benchmarking Zend Framework loader]]></title>
      <guid>http://www.phpdeveloper.org/news/10209</guid>
      <link>http://www.phpdeveloper.org/news/10209</link>
      <description><![CDATA[<p>
On the PHP 10.0 blog, <i>Stas</i> <a href="http://php100.wordpress.com/2008/05/16/benchmarking-zend-framework-loader/">does a little benchmarking</a> of a big part of each request to a Zend Framework application - the Loader.
</p>
<blockquote>
On <a href="http://framework.zend.com/">Zend Framework</a> <a href="http://framework.zend.com/archives">lists</a> there was a <a href="http://www.nabble.com/Zend-Loader-performance-to17170525.html#a17170525">topic</a> raised about performance impact of <a href="http://framework.zend.com/manual/en/zend.loader.html">Zend_Loader component</a>, which is used for - no surprise here! - loading classes, including autoloading, etc. Some folks thought that since Zend_Loader is executing some code before actual loading the required file, it must cost something. And it makes sense. However, how much does it cost?
</blockquote>
<p>
He uses a <a href="http://random-bits-of.info/fw-tests/">set of scripts</a> he developed to compare the bytecode caches of the requests both with and without the caching turned on. He ran the tests on a PHP 5.2 and PHP 5.3 installs with the lower (better) numbers coming from the latter in requests per second. He highly recommends turning this caching on on your system if you haven't already.
</p>]]></description>
      <pubDate>Mon, 19 May 2008 08:49:56 -0500</pubDate>
    </item>
  </channel>
</rss>
