<?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, 22 May 2012 13:31:29 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHPMaster.com: Type Hinting in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17627</guid>
      <link>http://www.phpdeveloper.org/news/17627</link>
      <description><![CDATA[<p>
On PHPMaster.com today there's a new tutorial posted about <a href="http://phpmaster.com/type-hinting-in-php/">using type hinting</a> in your PHP applications to restrict the values passed into your methods.
</p>
<blockquote>
Since PHP 5 you can use type hinting to specify the expected data type of an argument in a function declaration. When you call the function, PHP will check whether or not the arguments are of the specified type. If not, the run-time will raise an error and execution will be halted.
</blockquote>
<p>
Included in the post are code examples showing how to define custom types in a function definition and what happens if you pass the wrong type in. Also mentioned is one of the main limitations to hinting - the fact that it can't be used on default PHP variable types. 
</p>]]></description>
      <pubDate>Mon, 05 Mar 2012 13:19:24 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Derek Allard's Blog: Modifying the default CodeIgniter Calendar template for fun and profit]]></title>
      <guid>http://www.phpdeveloper.org/news/15632</guid>
      <link>http://www.phpdeveloper.org/news/15632</link>
      <description><![CDATA[<p>
<i>Derek Allard</i> has <a href="http://derekallard.com/blog/post/modifying-the-default-codeigniter-calendar-template-for-fun-and-profit/">a quick post</a> for the CodeIgniter users out there with some styling you can use on the default CI calendar.
</p>
<blockquote>
A project I'm working on needs a monthly calendar. Naturally, I'm using CodeIgniter as the base of it. [...] My needs were something more akin to the interface iCal provides; broad, spacious, subtle. Obviously, the default is just an unstyled base that CI provides as a starting grounds. The <a href="http://codeigniter.com/user_guide/libraries/calendar.html">Calendar library documentation</a> provides some insight into how we can start changing this up.
</blockquote>
<p>
He talks about the settings he needed to change including the "day_type" setting and template that specifies the CSS classes to use. Add in the CSS and you'll end up with <a href="http://www.derekallard.com/img/post_resources/finished_big_cal.png">something like this</a>. You can <a href="http://www.derekallard.com/img/post_resources/calendar_example.zip">download the example files</a> too.
</p>]]></description>
      <pubDate>Fri, 24 Dec 2010 11:09:33 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Zend Developer Zone: Chaining language with default route]]></title>
      <guid>http://www.phpdeveloper.org/news/14948</guid>
      <link>http://www.phpdeveloper.org/news/14948</link>
      <description><![CDATA[<p>
On the Zend Developer Zone there's <a href="http://devzone.zend.com/article/12381-Chaining-language-with-default-route">a new post</a> talking about including language information in your Zend Framework application's default route in a cleaner manner.
</p>
<blockquote>
There are several ways how to include language id in default route of Zend Framework. However, generally you end up with the solution not quite elegant and likely not totally trouble-free. I have seen people overwriting the default route by new one which mimics module route with additional language id. There is no need to throw the default module route away to do this. To get it right chain the plain language route with default route.
</blockquote>
<p>
He gives code examples of the routing code to put in your bootstrap that uses the <a href="http://framework.zend.com/manual/en/zend.controller.router.html#zend.controller.router.routes.chain">Zend_Controller_Router_Route_Chain</a> and a plugin to handle the language checking and routing handling.
</p>]]></description>
      <pubDate>Thu, 12 Aug 2010 10:47:01 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Emran Hasan' Blog: Changing the default controller naming convention in CodeIgniter]]></title>
      <guid>http://www.phpdeveloper.org/news/13254</guid>
      <link>http://www.phpdeveloper.org/news/13254</link>
      <description><![CDATA[<p>
<i>Emran Hasan</i> has <a href="http://www.phpfour.com/blog/2009/09/codeigniter-controller-naming-convention-modified/">a quick new post</a> to his blog today looking at how you can change the default controller naming scheme that the CodeIgniter framework uses (to prevent things like naming conflicts and the like).
</p>
<blockquote>
CodeIgniter is one of my favorite framework and I often use it for developing application quickly. Although it is very flexible in most cases, I find its naming convention to be strict. Many times I have faced this problem when my controller's class name and a model/library's class names are the same '" a Fatal error is inevitable.
</blockquote>
<p>
His method involves extending the core CI_Router class to change the _validate_request method to change the location and the naming convention (from Users to UsersController) for the default controller settings. Code for the update is included.
</p>]]></description>
      <pubDate>Mon, 21 Sep 2009 09:43:09 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Terry Chay's Blog: How much does a date() cost?]]></title>
      <guid>http://www.phpdeveloper.org/news/12476</guid>
      <link>http://www.phpdeveloper.org/news/12476</link>
      <description><![CDATA[<p>
In <a href="http://terrychay.com/blog/article/benchmarking-date-timezone.shtml">a new post</a> to his blog <i>Terry Chay</i> looks at the real cost of a (call to) <a href="http://php.net/date">date()</a> - the PHP function that can parse either the current or an inputted timestamp out into the date format you specify.
</p>
<blockquote>
One of the fringe benefits of open sources an existing code base is that you have an opportunity to setting error_reporting on E_ALL | E_STRICT or perhaps rather just to 2147483647. When you do that you find small problems with your code base you missed the first time you sloppily wrote it. In my case, I noticed that date() was throwing strict errors. 
</blockquote>
<p>
Due to his resulting request to test the error (after submitting a ticket to fix the server's php.ini settings), he went about trying to test and see what the real impact of working with the date function was by developing his own simple benchmarking script. It runs through five different tests some with a default timezone set and some not. His results found that doing it in the script versus on the server's config didn't make much of a difference so he corrected the issue with a quick <a href="http://php.net/ini_set">ini_set</a> (or a <a href="http://php.net/date_default_timezone_set">date_default_timezone_set</a>).
</p>]]></description>
      <pubDate>Thu, 07 May 2009 11:18:28 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Make Me Pulse: Using the Zend Framework URL rewriting]]></title>
      <guid>http://www.phpdeveloper.org/news/11743</guid>
      <link>http://www.phpdeveloper.org/news/11743</link>
      <description><![CDATA[<p>
New from the Make Me Pulse blog is <A href="http://blog.makemepulse.com/2009/01/15/using-the-zend-framework-url-rewriting/">this quick tutorial</a> about bending the URL rewriting that the Zend Framework does to match whatever your needs might be.
</p>
<blockquote>
Today for a good website's referencement in Google, it's necessary to have an URL rewriting. [...] If your application is based on ZF, we have a htaccess base file which will redirect all php files to the boostrap (<a href="http://framework.zend.com/docs/quickstart/create-a-bootstrap-file">what is the bootstrap ?</a>), and ZF classes will manage all redirection rules. How to implement the URL rewriting with ZF classes ?
</blockquote>
<p>
He sets up a config file (an ini file) with the routing instructions the framework will need to adhere to and shows how to get the application to include it and match against it for routing rules. His example sets a default route and several regular expression-based routes to remap requests right where they need to go.
</p>]]></description>
      <pubDate>Thu, 15 Jan 2009 07:55:15 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Mike Bernat's Blog: CakePHP - Changing the Default Value of a Date-Time Input]]></title>
      <guid>http://www.phpdeveloper.org/news/11541</guid>
      <link>http://www.phpdeveloper.org/news/11541</link>
      <description><![CDATA[<p>
In a <a href="http://www.mikebernat.com/blog/CakePHP_-_Changing_the_Default_Value_of_a_Date-Time_Input">recent post</a> to his blog <i>Mike Bernat</i> gives a quick tip on how to change the default value of a data-time input field in a CakePHP application.
</p>
<blockquote>
Automagically generated date/time input fields normally default to the current date and time. For a couple of reasons, I had to change this to another default value.
</blockquote>
<p>
His included code shows how to modify the default behavior of the form input field for the date with an array of parameters including the hour, minute and meridian (am/pm) values for the element.
</p>]]></description>
      <pubDate>Wed, 10 Dec 2008 07:54:44 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPedia Blog: Top 5 PHP replacements for Apache default directory listing]]></title>
      <guid>http://www.phpdeveloper.org/news/10674</guid>
      <link>http://www.phpdeveloper.org/news/10674</link>
      <description><![CDATA[<p>
The PHPedia blog has posted their <a href="http://php.bubble.ro/top-5-php-replacements-for-apache-default-directory-listing/">top five list</a> if scripts to replace the default listing Apache does for a directory without an index file.
</p>
<p>Here's their list:</p>
<ul>
<li><a href="http://phpfe.vigge.net/">phpFe</a> - PHP file explorer
<li><a href="http://filenice.com/">fileNice</a>
<li><a href="http://autoindex.sourceforge.net/">Autoindex</a>
<li><a href="http://sourceforge.net/projects/quixplorer/">QuiXplorer</a>
<li><a href="http://lesterchan.net/site/downloads/">GaMerZ File Explorer</a>
</ul>
<p>
Check out the <a href="http://php.bubble.ro/top-5-php-replacements-for-apache-default-directory-listing/">PHPedia post</a> for example screenshots of each.
</p>]]></description>
      <pubDate>Thu, 24 Jul 2008 10:21:25 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Ibuildings Blog: Off-The-Shelf Server Setup]]></title>
      <guid>http://www.phpdeveloper.org/news/10306</guid>
      <link>http://www.phpdeveloper.org/news/10306</link>
      <description><![CDATA[<p>
On the Ibuildings blog, <i>Ian Barber</i> has <a href="http://www.ibuildings.com/blog/archives/1021-Off-The-Shelf-Server-Setup.html">a reminder</a> to PHP developers out there used to their servers "just working" because of the popularity of LAMP. He recommends digging a little deeper to the "behind the scenes" of how the server is configured.
</p>
<blockquote>
PHP programmers generally know what a good systems architecture should look like, but it is often a reality of development that they will have little input on the system itself until the last minute. In fact, it's far from uncommon for a developer to be faced with an off-the-shelf dedicated LAMP server, and left up to their own devices.
</blockquote>
<p>
He recommends getting to know things like the package manager for your distribution (apt, yum, yast, etc), stripping down the modules your installation is using, check that all of the packages in use need to be enabled and ensure that the network connection is set up correctly and is what you need for the site.
</p>]]></description>
      <pubDate>Fri, 30 May 2008 08:43:28 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Brian Moon's Blog: PHP's MySQL connection timeout]]></title>
      <guid>http://www.phpdeveloper.org/news/9419</guid>
      <link>http://www.phpdeveloper.org/news/9419</link>
      <description><![CDATA[<p>
In the process of debugging one of his scripts, <i>Brian Moon</i> came across a default setting (and problem) in the MySQL extension that didn't seem to <a href="http://doughboy.wordpress.com/2008/01/13/phps-mysql-connection-timeout/">make much sense to him</a>:
</p>
<blockquote>
There are several reasons that PHP could not be able to connect to MySQL. [...] Or, perhaps the entire server is offline.
</blockquote>
<p>
The mysql.connect_timeout setting in the php.ini is supposed to handle this sort of instance, but the default is set tpo 60 seconds. It's only apparently used when the server is completely offline and, in his opinion, is set way too high. He's proposing a patch to the MySQL extension to change this setting's default to shorten it to something a bit more reasonable.
</p>]]></description>
      <pubDate>Mon, 14 Jan 2008 12:59:00 -0600</pubDate>
    </item>
  </channel>
</rss>

