News Feed
Jobs Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Andrew Podner:
Using Final to Prevent Overrides and Extension
November 26, 2012 @ 10:36:05

In the latest post to his site Andrew Podner takes a quick look at something you don't see too much in PHP applications but is a familiar concept to some coming in to the language from others - using "final" to prevent overrides of the code in your classes.

In a previous post about inheritance, I showed you how to extend a class. One aspect of extending classes that wasn't fully covered was the idea of overriding a method in a class. You can override a method (function) from the base class by simply redefining the method in the child class. [...] There are times though, when you do not want a method to ever be overridden. There may even be cases where you do not want a class to be extended.

His example shows how to use this "final" keyword on a database class, protecting a method (getRecord) that could potentially break the application if changed. This would then give the developer trying to extend the class an error noting that that method cannot be overridden. One thing to note, if you're going to use "final" in your code, be sure you know what you're doing. More often than not, you probably just want something like "private" or "protected" (see this post for a bit more explanation).

0 comments voice your opinion now!
final class method tutorial visibility extend override


Matthew Weier O'Phinney's Blog:
On Visibility in OOP
June 29, 2012 @ 09:52:03

Matthew Weier O'Phinney has a new post to his blog today looking at visibility in OOP in PHP - less about the features the language offers and more about the theory of their use.

I'm a big proponent of object oriented programming. OOP done right helps ease code maintenance and enables code re-use. Starting in PHP, OOP enthusiasts got a whole bunch of new tools, and new tools keep coming into the language for us with each minor release. One feature that has had a huge impact on frameworks and libraries has been available since the earliest PHP 5 versions: visibility.

He covers a bit of the syntax and features of public, private and protected and mentions a keyword not often seen in PHP applications - final. The reason all of this came up was work on annotation support in Zend Framework 2 and some difficulty in integrating it with Doctrine support. The "final" status of the class was part of the problem, and after a a lot of copy & pasting he decided on a different tactic - using its public API to try to work around the problem.

In sum: because the class in question was marked final and had private members, I found myself forced to think critically about what I wanted to accomplish, and then thoroughly understand the public API to see how I might accomplish that task without the ability to extend.
0 comments voice your opinion now!
visibility oop final annotation doctrine


Community News:
Final jsDay/phpDay Schedules Posted!
April 11, 2012 @ 11:24:31

The jsDay and phpDay conferences have just posted their final schedules and from the looks of them, they're both going to be great events!

Sessions from jsDay include:

  • Backbone.js FTW! (Pierre Spring)
  • JavaScript Application Architecture (Brandon Keepers)
  • Ember.js - Focus on your app not on boilerplate code (Garret Alfert)
  • Getting Started with Nodejitsu (Nuno Job)
  • Go to hell Flash! We have Open Web! (Michal Budzynski)

Sessions from phpDay include:

  • Test Driven Development with Symfony 2 (Jacopo Romei)
  • Scalable architectures: Taming the Twitter Firehose (Lorenzo Alberton)
  • Get'em in shape: let customers appreciate the agile workflow (Stefano Maraspin)
  • An introduction to Phing the PHP build system (Jeremy Coates)

For more information about these events and to get your tickets, see the sites for each conference: phpDay, jsDay.

0 comments voice your opinion now!
jsday12 phpday12 final schedule release


Symfony Blog:
Symfony2 The Roadmap to Final
July 25, 2011 @ 09:09:00

On the Symfony blog Fabien Potencier has posted about the roadmap to a final release for the Symfony2 version of the popular framework including some of the things that will and will not change after the release.

We are now ready to release Symfony 2.0 final. As we have made some significant changes in the last couple of weeks, we are publishing another release candidate (RC5) today and we will wait for a week before releasing Symfony 2.0 final on Thursday 28th.

The upgrade to Symfony2 is just a few commands away and there's a large list of components that are set and will not be changed moving forward including the DependencyInjection, Finder, Locale, Routing and Validator.

Symfony 2.1 will be the first release with all the components with a public stable API. And for components that already have a public API in 2.0, 2.1 will be the occasion to add even more classes and methods to it.
0 comments voice your opinion now!
roadmap final release symfony2 feature


Community News:
Last Day for php|tek 2009 Call for Papers
December 15, 2008 @ 15:56:34

As a reminder, today is the last day to get in talk proposals for next year's php|tek conference:

Today is the last day of the Call for Papers for our upcoming php|tek 2009 conference, which will take place in Chicago between May 19 and 22nd. Don't forget to send in your proposals before it's too late!

You can get more information about submitting a talk from this page on the conference website as well as where to send the proposals and what kind of speaker compensation package they have to offer.

0 comments voice your opinion now!
submit proposal phptek09 callforpaper final day


PHP.net:
PHP 4.4.9 Released!
August 08, 2008 @ 07:58:18

The PHP group has officially announced the availability of the final release of the PHP4 series for the language - PHP 4.4.9.

The PHP development team would like to announce the immediate availability of PHP 4.4.9. It continues to improve the security and the stability of the 4.4 branch and all users are strongly encouraged to upgrade to it as soon as possible. This release wraps up all the outstanding patches for the PHP 4.4 series, and is therefore the last PHP 4.4 release.

Issues corrected by this release include an upgrade to the PCRE version, a crash bug in imageloadfont and the open_basedir handling in the curl extension. You can download this latest release from downloads page on the PHP.net website.

0 comments voice your opinion now!
php4 release endoflive final download security patch


Community News:
Last Day for php|works/PyWorks 2008 Call for Papers
July 25, 2008 @ 12:02:44

As a reminder to all of those wanting to submit papers to this year's php|works/PyWorks combo conference, today is your last day!

As with all our conferences, our main goal is to provide our attendees - mostly a highly technical crowd who is looking for specific, to-the-point information on relevant developer topics - with content that is as relevant as possible to their daily lives. [...] If you have a cool idea about a product or platform that somehow relates to PHP, we definitely want to hear from you!

Check out this page for some of the guidelines (and suggestions) about submitting your proposal. The Call for Papers will close at the end of the day, July 25th, 2008 and all talks must be submitted via email to proposals@phparch.com for consideration.

0 comments voice your opinion now!
phpworks08 pyworks08 conference callforpapers final


Ibuildings Blog:
T minus one (the PHP4 8-8-08 Deadline)
July 09, 2008 @ 08:46:13

As Ivo Jansch pointed out yesterday it's a month until the fateful day that PHP4 will officially die:

It's July the 8th. Today I realized that we're exactly one month away from 8-8-8, the final blow to PHP4.

August 8th marks the point when nothing (at all) will be done to any version of PHP4 again. Full support ended back in December of 2007 with no new versions being released. 8-8-08 marks the end of that as well and PHP4 developers that discover bugs may not be able to get them fixed.

Ivo sums it it perfectly:

I'm not trying to scare you. No wait, I am. Don't let 8-8-8 become the PHP community's 6-6-6 and abandon PHP4 while you still can.
0 comments voice your opinion now!
deadline php4 final php5 upgrade security fix


DevShed:
More on Private Methods with PHP 5 Member Visibility
June 25, 2008 @ 13:58:20

DevShed finishes off their series looking a private, public and protected variables and methods in classes with this final look a private methods in PHP5 object-oriented programming.

It's time to leap forward and tackle this final article of the series, which will be focused on covering some additional aspects concerning the use of this kind of class method. In addition, I'll teach you how to utilize the "final" keyword, which is included with PHP 5, to prevent the methods of a specific class from being overridden by any subclass.

They work from a hands-on example to show how they can work with private methods (expanding a bit from last time) and how to use the "final" keyword to restrict any and all modification for a method.

0 comments voice your opinion now!
php5 tutorial oop member visibility method property final private


Community News:
Dutch PHP Conference Speakers Finalized
April 30, 2008 @ 12:01:51

As Ivo Jansch mentions, the speaker list for this year's Dutch PHP conference has been finalized:

Based on feedback from the 'call for ideas' we have added a session on security. It will be presented by Johann-Peter Hartmann, the CTO of Mayflower. Also, we are happy to announce that Terry Chay, a well-known blogger in the PHP community and informally called the 'PHP terrorist', will deliver the closing keynote.

You can check out the rest of the presentations (5 tutorials and 12 sessions) on the conference's schedule page and, if you haven't already yet, you can still register to reserve your spot to enjoy this great event (talks only, tutorials are sold out).

0 comments voice your opinion now!
dutchphpcon2008 speaker list final presentation



Community Events











Don't see your event here?
Let us know!


performance package symfony2 facebook composer opinion application podcast framework unittest hack install overview language release security component introduction hhvm database

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework