<?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 16:04:59 -0600</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Gonzalo Ayuso's Blog: Using PHP classes to store configuration data]]></title>
      <guid>http://www.phpdeveloper.org/news/15711</guid>
      <link>http://www.phpdeveloper.org/news/15711</link>
      <description><![CDATA[<p>
<i>Gonzalo Ayuso</i> has <a href="http://gonzalo123.wordpress.com/2011/01/10/using-php-classes-to-store-configuration-data/">a new post</a> to his blog today looking at how he uses PHP classes to store configuration information for easier retrieval.
</p>
<blockquote>
In my last projects I'm using something I think is useful and it's not a common practice in our PHP projects. That's is the usage of a plain PHP's class for the application's configuration. Let me explain it. Normally we use ini file for configuration. [...] There are many standard options. Why I prefer a different one then? I like plain PHP classes because the IDE helps me with autocompletion. The usage is quite simple. 
</blockquote>
<p>
His example uses a standard class to store the configuration values, one that can be loaded into a project and lets you call the configuration values statically. He gives <a href="http://gonzalo123.files.wordpress.com/2011/01/netbeans.png">two</a> <a href="http://gonzalo123.files.wordpress.com/2011/01/vim.png">examples</a> of how this is helpful in a standard IDE with autocompletion.
</p>]]></description>
      <pubDate>Mon, 10 Jan 2011 11:57:39 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPBuilder.com: Working with the Symfony Components PHP Libraries]]></title>
      <guid>http://www.phpdeveloper.org/news/14500</guid>
      <link>http://www.phpdeveloper.org/news/14500</link>
      <description><![CDATA[<p>
On PHPBuilder.com today there's a new article looking at <a href="http://phpbuilder.com/columns/Octavia_Anghel051110.php3">working with the three Symfony component libraries</a> as standalone tools that can be used outside of the framework - YAML handling, templating and an event dispatcher.
</p>
<blockquote>
These libraries were once an integrated part of the Symfony project, but now they represent a separate Symfony project. Because the Symfony Components are standalone PHP classes, you can both use them without the Symfony MVC framework and integrate them very easily in any PHP project. You can install each of the Symfony Components in the same, very simple manner. All you need to do is download the source code (a TAR or a ZIP archive) from the <a href="http://components.symfony-project.org/">project page</a>.
</blockquote>
<p>
The tutorial goes through each tool, briefly explaining what the technology is that's involved and provides some code examples to show you its use.
</p>]]></description>
      <pubDate>Wed, 12 May 2010 08:48:18 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Fabien Potencier's Blog: The state of YAML in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/13704</guid>
      <link>http://www.phpdeveloper.org/news/13704</link>
      <description><![CDATA[<p>
In <a href="http://fabien.potencier.org/article/40/the-state-of-yaml-in-php">this new article</a> on his blog <i>Fabien Potencier</i> looks at the current state of the YAML markup language and how well it's supported in the world of PHP.
</p>
<blockquote>
YAML can be used to describe both simple and complex data structures. It's an easy to learn language that describes data. As PHP, it has a syntax for simple types like strings, booleans, floats, integers, arrays, and even more complex ones like objects. Nowadays, YAML is a heavily used format for configuration files, mainly because even non programmers are able to understand and modify YAML files easily.
</blockquote>
<p>
He spends a little time describing the YAML markup format and shows how to parse it using the <a href="http://symfony-project.org">Symfony</a> component, how to get it and install it (via svn checkout).
</p>]]></description>
      <pubDate>Mon, 21 Dec 2009 09:25:17 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Daniel Cousineau's Blog: Doctrine Migrations Proper]]></title>
      <guid>http://www.phpdeveloper.org/news/13416</guid>
      <link>http://www.phpdeveloper.org/news/13416</link>
      <description><![CDATA[<p>
<i>Daniel Cousineau</i> has <a href="http://www.toosweettobesour.com/2009/10/20/doctrine-migrations-proper/">posted a quick guide</a> to migrating database information with Doctrine:
</p>
<blockquote>
I was talking with someone [...] here at ZendCon and discovered that they were having trouble with migrations in Doctrine. Having gone through the same issues of Doctrine seemingly not being able to figure out your changes and generate migration classes, I thought I'd post the solution here for future reference.
</blockquote>
<p>
It's four quick steps that'll get Doctrine to automatically generate the differences (deltas) and upgrade your models to reflect these changes.
</p>]]></description>
      <pubDate>Wed, 21 Oct 2009 09:57:11 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Community News: Symfony Components Dedicated Website]]></title>
      <guid>http://www.phpdeveloper.org/news/12529</guid>
      <link>http://www.phpdeveloper.org/news/12529</link>
      <description><![CDATA[<p>
In case you hadn't heard by now, the symfony project's components sub-project of the main framework has <a href="http://www.symfony-project.org/blog/2009/05/15/symfony-components-website">gotten its own website</a>:
</p>
<blockquote>
Some time ago, I have introduced the <a href="http://www.symfony-project.org/blog/2009/03/30/introducing-symfony-components">new "Symfony Components"</a> project. It is a sub-project of Symfony that aims to give more importance to some of the great libraries we have developed for Symfony. [...] Today, I am happy to announce that the Symfony Components now have their <a href="http://components.symfony-project.org/">dedicated website</a>.
</blockquote>
<p>
Each of the current components (YAML, Event Dispatcher, Dependency Injection, Template - though the last three are "coming soon") have documentation, info about the API, examples of how to install and use it and how to give back to the code for the component directly.
</p>]]></description>
      <pubDate>Mon, 18 May 2009 09:23:09 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Fabien Potencier's Blog: Symfony Service Container: Using XML or YAML to describe Services]]></title>
      <guid>http://www.phpdeveloper.org/news/12314</guid>
      <link>http://www.phpdeveloper.org/news/12314</link>
      <description><![CDATA[<p>
<i>Fabien Potencier</i> has posted the most recent article in his "Symfony Service Container" series, a look at <a href="http://fabien.potencier.org/article/15/symfony-service-container-using-xml-or-yaml-to-describe-services">using XML/YAML to describe services</a>.
</p>
<blockquote>
Today, with the help of service loaders and dumpers, you will learn how to use XML or YAML to describe your services. The Symfony Dependency Injection component provides helper classes that load services using "loader objects". By default, the component comes with two of them: sfServiceContainerLoaderFileXml to load XML files, and sfServiceContainerLoaderFileYaml to load YAML files.
</blockquote>
<p>
He reviews the "dumper objects" - tools used to take a service container and push it out into normal PHP code - and how you can use them to dump the Service Container's information out to the XML and YAML formats. Once you have this, it can be loaded back at any time via the two loaders mentioned above. There's plenty of code examples included for these and other more detailed examples.
</p>]]></description>
      <pubDate>Thu, 09 Apr 2009 12:06:22 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Fabien Potencier's Blog: Symfony Service Container: The Need for Speed]]></title>
      <guid>http://www.phpdeveloper.org/news/12275</guid>
      <link>http://www.phpdeveloper.org/news/12275</link>
      <description><![CDATA[<p>
<i>Fabien Potencier</i> has <a href="http://fabien.potencier.org/article/16/symfony-service-container-the-need-for-speed">posted another article</a> about dependency injection and the Symfony service container. In this part of the series he looks at the "need for speed" - reducing the need for the XML/YAML parsing of the same information on every request via a new tool, the PHP dumper.
</p>
<blockquote>
With the introduction of the XML and YAML configuration files, you might have became a bit sceptic about the performance of the container itself. Even if services are lazy loading, reading a bunch of XML or YAML files on each request and creating objects by using introspection is probably not very efficient in PHP. [...] How can you have the best of both world? That's quite simply. The Symfony Dependency Injection component provides yet another built-in dumper: a PHP dumper. 
</blockquote>
<p>
The dumper lets you convert the service container into regular PHP code (expanding the container's functionality out into a Container class based on the XML/YAML configuration.
</p>]]></description>
      <pubDate>Fri, 03 Apr 2009 12:03:24 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Mike Lively's Blog: YAML Now Supported by PHPUnit Database Extension]]></title>
      <guid>http://www.phpdeveloper.org/news/11853</guid>
      <link>http://www.phpdeveloper.org/news/11853</link>
      <description><![CDATA[<p>
<i>Mike Lively</i> <a href="http://www.ds-o.com/archives/79-YAML-Now-Supported-by-PHPUnit-Database-Extension.html">has posted</a> about a new bit of support that the <a href="http://phpunit.de">PHPUnit</a> unit testing software for PHP has just gotten - YAML data set parsing.
</p>
<blockquote>
I have now just committed <a href="http://www.ds-o.com/exit.php?url_id=246&entry_id=79">YAML</a> data sets to the Database Extension for <a href="http://www.ds-o.com/exit.php?url_id=247&entry_id=79">PHPUnit</a>. So now all those that love the simplicity and straightforwardness of YAML can use it with your data sets. I have also created a persistor for YAML datasets so you can easily convert existing data sets or database data into YAML representations.
</blockquote>
<p>
He includes an example of a bit of YAML markup and one of the major hurdles he had to overcome - trailing line breaks (as shown in the table_2/column 8 in the example). This functionality also includes a persistor that lets you convert things back the other day - current data set to YAML markup. You can find out more about data sets in PHPUnit in <a href="http://www.phpunit.de/manual/current/en/database.html#database.datasets">this section</a> of the project's manual.
</p>]]></description>
      <pubDate>Mon, 02 Feb 2009 07:52:31 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Francois Zaninotto's Blog: Validating a YAML file against a schema in PHP ]]></title>
      <guid>http://www.phpdeveloper.org/news/11081</guid>
      <link>http://www.phpdeveloper.org/news/11081</link>
      <description><![CDATA[<p>
<i>Francois Zaninotto</i> submitted a <a href="http://redotheweb.com/2008/09/09/validating-a-yaml-file-against-a-schema-in-php/">tutorial he's written up</a> about creating a YAML validation script with PHP.
</p>
<blockquote>
As of today, there is no simple way to validate the syntax of a YAML file in PHP. But with two simple tricks, it takes only a few dozens of lines of code to build a robust validator capable of checking the syntax of any YAML file against a given schema.
</blockquote>
<p>
He points out that Ruby has a tool for this (<a href="http://www.kuwata-lab.com/kwalify/">kwalify</a>) but PHP doesn't. He creates his own with the help of the <A href="http://trac.symfony-project.org/browser/branches/1.1/lib/yaml">sfYaml</a> component from the symfony framework, translating the YAML data into something PHP can parse more easily - XML. He passes this through an XSL parser and uses the DOM XML <a href="http://php.net/schemaValidate">schemaValidate</a> function to check it against the given schema.
</p>]]></description>
      <pubDate>Wed, 24 Sep 2008 12:58:35 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Symfony Blog: YAML in symfony 1.1]]></title>
      <guid>http://www.phpdeveloper.org/news/10442</guid>
      <link>http://www.phpdeveloper.org/news/10442</link>
      <description><![CDATA[<p>
<a href="http://www.symfony-project.org/blog/2008/06/19/yaml-in-symfony-1-1">This new post</a> on the Symfony blog today looks at using the framework's built-in support for the YAML format. They include a few examples of the code to make the files and how to use them.
</p>
<blockquote>
Here is a short tutorial about my discovery of the new YAML parsing library that comes with symfony 1.1. As you may know, YAML files are a place symfony developers spend time writing configuration, it is very important they have a good tool to manipulate data and debug files.
</blockquote>
<p>
They include code showing how to pull in a sample file, access the properties inside of it and how to take a multi-dimensional PHP array and push it back out (automagically) into a new YAML formatted file.
</p>]]></description>
      <pubDate>Thu, 19 Jun 2008 11:18:38 -0500</pubDate>
    </item>
  </channel>
</rss>

