<?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>Mon, 20 May 2013 23:18:20 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[DZone.com: PHPUnit_Selenium]]></title>
      <guid>http://www.phpdeveloper.org/news/17424</guid>
      <link>http://www.phpdeveloper.org/news/17424</link>
      <description><![CDATA[<p>
On DZone.com today <i>Giorgio Sironi</i> has a quick tutorial showing you how to set up and use the <a href="http://css.dzone.com/articles/phpunitselenium">PHPUnit_Selenium</a> component in the latest releases of the <a href="http://phpunit.de">popular testing software</a>.
</p>
<blockquote>
With the 1.2 release, PHPUnit_Selenium supports (basically) for the first time the Selenium 2 WebDriver API. While PHPUnit_Selenium already worked with Selenium 2, it did so only by using the Selenium 1 emulation included in the jar; now it provides an object-oriented API right natively supported in a base PHPUnit test case, shipped in PHPUnit's PEAR channel.
</blockquote>
<p>
He includes the steps you'll need to pull it from the PEAR channel and how to set up a test case based on the PHPUnit_Extensions_Selenium2TestCase object. He gives a few examples of how to select various components on the page (via CSS selectors and XPath), assert that the right information is there and interact with forms.
</p>]]></description>
      <pubDate>Fri, 20 Jan 2012 09:12:18 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Devis Lucato's Blog: Select: Inversion of Control]]></title>
      <guid>http://www.phpdeveloper.org/news/17260</guid>
      <link>http://www.phpdeveloper.org/news/17260</link>
      <description><![CDATA[<p>
In a recent post to his blog <i>Devis Lucato</i> introduces the "Inversion of Control" design pattern and <a href="http://lucato.it/inversion-of-control">shares an implementation</a> he's created as an illustration - a Service Locator called <a href="https://github.com/dluc/Select">Select</a>.
</p>
<blockquote>
[In a Service Locator] all the dependencies are provided by a builder, which serves as a registry of dependencies and/or service definitions. The service locator knows how to instantiate each dependency.   Such service exposes methods like 'getMailer()', 'getLogger()' etc.  A service locator centralises the configuration detailing classes and parameters involved on objects instantiations.
</blockquote>
<p>
He includes some sample code showing the structure of a Select implementation using a "Mailer" identifier and definitions of the classes to load for it. He also includes a bit of documentation of the (simple) API you can use to work with the tool - setting namespaces, replacing class definitions, creating definitions and finding the resource associated with a definition (to name a few).
</p>]]></description>
      <pubDate>Wed, 14 Dec 2011 13:34:53 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Court Ewing's Blog: Create and Validate a Choice List in a Symfony 2 Form]]></title>
      <guid>http://www.phpdeveloper.org/news/16728</guid>
      <link>http://www.phpdeveloper.org/news/16728</link>
      <description><![CDATA[<p>
<i>Court Ewing</i> has written up a new post to his blog about <a href="http://epixa.com/2011/08/create-and-validate-a-choice-list-in-a-symfony-2-form">creating a "choice" list</a> (a select list as defined by Symfony 2) with dynamic options and validating the resulting submission. His example uses Doctrine 2 entities to work with most of the data handling.
</p>
<blockquote>
A standard select list can be created using Symfony's choice field type; it is pretty clear how to create a new <a href="http://symfony.com/doc/current/reference/forms/types/choice.html">choice</a> field with simple, non-dynamic options (e.g. gender), but it gets a little more complicated when you want to create and validate a dynamically generated choice list.
</blockquote>
<p>
He includes the code for a simple entity, a Post model to fetch the category information and the set up of the form element - a select list of post types/categories. He also includes a bonus section showing how you can achieve the same thing without a model to bind to. 
 The code's a little bit more complex than the previous example, but it's basically just reproducing some of the validation and fetching logic manually.
</p>]]></description>
      <pubDate>Wed, 17 Aug 2011 08:28:21 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Ian Christian's Blog: Creating a custom form field type in Symfony 2]]></title>
      <guid>http://www.phpdeveloper.org/news/16725</guid>
      <link>http://www.phpdeveloper.org/news/16725</link>
      <description><![CDATA[<p>
<i>Ian Christian</i> has added a new post to his blog today showing how you can <a href="http://pookey.co.uk/wordpress/archives/286-creating-a-custom-form-field-type-in-symfony-2">create a custom form field type in Symfony 2</a> by extending the AbstractType.
</p>
<blockquote>
I am finally starting to dive into symfony 2 properly. Yes - it's taken a while, work has taken me in different directions! I found myself needing to create a custom form field type pretty quickly, but couldn't find much in the way of documentation to do so, so I thought I'ld throw it up here; partly to help others, but mostly to get feedback to make sure I'm not approaching this from the wrong angle.
</blockquote>
<p>
He includes the code that creates his custom "Person" model and the class to create his "transport type" select box that pulls in its values from a "choice list" class. He registers it in his bundle and it can then be included in his buildForm() method just like any other form field.
</p>]]></description>
      <pubDate>Tue, 16 Aug 2011 12:04:37 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Rob Allen's' Blog: A Zend Framwork compound form element for dates]]></title>
      <guid>http://www.phpdeveloper.org/news/16075</guid>
      <link>http://www.phpdeveloper.org/news/16075</link>
      <description><![CDATA[<p>
In a new post to his blog today <i>Rob Allen</i> shows you how to create <a href="http://akrabat.com/zend-framework/a-zend-framwork-compount-form-element-for-dates/">compound form element handling</a> in a Zend Framework application thanks to some custom work with Zend_Form and Zend_View extensions.
</p>
<blockquote>
A little bit of googling found this site <a href="http://codecaine.co.za/posts/compound-elements-with-zend-form">http://codecaine.co.za/posts/compound-elements-with-zend-form</a> which has not unfortunately disappeared, so the code in this article owes a lot of the author of that article. It turns out to be remarkably simple to create a single Zend Form element that is rendered as multiple form elements. We create an element object and a view helper object and we're done. 
</blockquote>
<p>
He shows how to create a custom form date helper that extends the base XHTML to create the isValid/getValue methods for handling the complex date input. There's also the code for the view that creates the <a href="http://akrabat.com/wp-content/uploads/2011-03-Screen-shot-2011-03-08-at-20.45.03.png">custom date input</a> and repopulates the content if there's a need.
</p>]]></description>
      <pubDate>Mon, 21 Mar 2011 12:23:08 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Jani Hartikainen' Blog: Database backed Zend_Form elements]]></title>
      <guid>http://www.phpdeveloper.org/news/12089</guid>
      <link>http://www.phpdeveloper.org/news/12089</link>
      <description><![CDATA[<p>
<i>Jani Hartikainen</i> has <a href="http://codeutopia.net/blog/2009/03/09/database-backed-zend_form-elements/">a new post</a> that should interest the Zend Framework developers out there - a look at automatically querying the database to fill in the right option values for a Zend_Form element.
</p>
<blockquote>
It's not very tricky to query a database, and fill a Zend_Form element's possible values from the resultset, but it can be quite boring and extraneous code... We could also create an element which we can give some SQL, and it'll fill itself automatically! This way you can even define database-backed elements in XML or INI configuration files.
</blockquote>
<p>
He starts with a simple Select element type example and builds from there. He creates a DbSelect layer for the element and with the help of a main method, _performSelect, the script can create a new instance of the CU_Form_Element_DbSelect to pull in the options from the SQL (given in the "dbSelect" parameter).
</p>]]></description>
      <pubDate>Mon, 09 Mar 2009 08:45:27 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Sameer Borate's Blog: Selecting all except some columns in MySQL]]></title>
      <guid>http://www.phpdeveloper.org/news/12045</guid>
      <link>http://www.phpdeveloper.org/news/12045</link>
      <description><![CDATA[<p>
<i>Sameer Borate</i> <a href="http://www.codediesel.com/mysql/selecting-all-except-some-columns-in-mysql/">shows how</a> to turn things around in your application's SQL statement and, instead of selecting the columns you need, showing how to remove the columns you don't need dynamically.
</p>
<blockquote>
The MySQL SELECT is a ubiquitous statement. You can select rows using the '˜*' operator or by listing the individual column names. But many times you may require using all the columns from a table except a couple of them. For example you may have a table containing twelve columns from which you require only eleven columns.
</blockquote>
<p>
Sometimes that extra column can contain larger content you might not need or want. He creates a get_column_names and create_statement functions that grab the column names and, based on an "exclude" array, takes out the unwanted records. The array is then looped through and appended back together as the new column list for the select.
</p>]]></description>
      <pubDate>Mon, 02 Mar 2009 11:13:08 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Johannes Schluter's Blog: MySQL Storage Engine based on PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/11638</guid>
      <link>http://www.phpdeveloper.org/news/11638</link>
      <description><![CDATA[<p>
In <a href="http://schlueters.de/blog/archives/96-MySQL-Storage-Engine-based-on-PHP.html">this new post</a> to his blog <i>Johannes Schluter</i>  looks at creating a storage engine plugin for MySQL via its <a href="http://dev.mysql.com/doc/refman/5.1/en/plugin-api.html">plugin interface</a>.
</p>
<blockquote>
MySQL 5.1 has a <a href="http://dev.mysql.com/doc/refman/5.1/en/plugin-api.html">plugin interface</a> to easily add storage engines. <a href="http://php.net/">PHP</a> can easily embedded into other applications.  So why not combine these two things? - Writing a <a href="http://dev.mysql.com/doc/refman/5.1/en/plugin-api.html">MySQL Storage Engine</a> which reads data by calling a PHP script.
</blockquote>
<p>
He starts with a basic example with create_table and open_table functions that can pull the data from the table marked with the "Engine" setting of PHP. He expands on this to allow for more functionality - update, delete and write methods are added.
</p>]]></description>
      <pubDate>Tue, 30 Dec 2008 08:42:03 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Stefan Mischook's Blog: SQL insert statements in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/10642</guid>
      <link>http://www.phpdeveloper.org/news/10642</link>
      <description><![CDATA[<p>
<i>Stefan Mischook</i> has posted a <a href="http://www.killerphp.com/articles/sql-insert-statements-in-php/">new introductory video</a> for those just starting out with SQL in their PHP scripts - a look at using a (MySQL) database.
</p>
<blockquote>
I've finally released my first <a href="http://www.killerphp.com/videos/sql_statements_in_php.php">video on using SQL statements</a> in PHP pages. This is the next step after connecting to a MySQL database. I hope you find the videos useful.
</blockquote>
<p>
The video looks at the "big four" - insert, update, delete and select, but focuses on the select statements and how to use them with function like <a href="http://php.net/mysql_fetch_assoc">mysql_fetch_assoc</a> and <a href="http://php.net/mysql_fetch_array">mysql_fetch_array</a> to get the results out of your database. 
</p>]]></description>
      <pubDate>Mon, 21 Jul 2008 07:58:46 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Working with PHP and MySQL]]></title>
      <guid>http://www.phpdeveloper.org/news/7928</guid>
      <link>http://www.phpdeveloper.org/news/7928</link>
      <description><![CDATA[<p>
DevShed has a <a href="http://www.devshed.com/c/a/MySQL/Working-with-PHP-and-MySQL/">new tutorial</a> today that's part two in a series looking at working with the combination of PHP and MySQL - "Working with PHP and MySQL".
</p>
<blockquote>
You'll learn how to select the database, fetch and display data, and more. This article is excerpted from chapter 9 of Learning PHP and MySQL, written by Michele Davis and Jon Phillips.
</blockquote>
<p>
They <a href="http://www.devshed.com/c/a/MySQL/Working-with-PHP-and-MySQL/">start by selecting the database</a> before moving on to the query. With a select query, they grab the information from the books tablw and display it out to the page (fetching with both a mysql_fetch_row and mysql_fetch_array).
</p>]]></description>
      <pubDate>Tue, 29 May 2007 09:31:00 -0500</pubDate>
    </item>
  </channel>
</rss>
