PHP Objects, Patterns, and Practice

2nd Edition

By Matt Zandstra

PHP Objects, Patterns, and Practice, Second Edition shows you how to meld the power of PHP with the sound enterprise development techniques embraced by professional programmers.

Full Description

  • ISBN13: 978-1-59059-909-9
  • 487 Pages
  • User Level: Beginner to Advanced
  • Publication Date: December 19, 2007
  • Available eBook Formats: EPUB, MOBI, PDF
  • Print Book Price: $44.99
  • eBook Price: $31.99
Buy eBook Buy Print Book Add to Wishlist

Related Titles

Full Description

Backed by a tireless development community, PHP has been a model of language evolution over its 10+ year history. Borne from a contract developer’s pet project, these days you’ll find PHP powering many of the world’s largest web sites, including Yahoo!, Digg, EA Games, and Lycos.

PHP Objects, Patterns, and Practice, Second Edition shows you how to meld the power of PHP with the sound enterprise development techniques embraced by professional programmers. Going well beyond the basics of object–oriented development, you’ll learn about advanced topics such as working with static methods and properties, abstract classes, interfaces, design patterns, exception handling, and more. You’ll also be exposed to key tools such as PEAR, CVS, Phing, and phpDocumentor.

What you’ll learn

  • Write solid, maintainable code by embracing object–oriented techniques and design patterns
  • Create detailed, versatile documentation using the powerful phpDocumentor automated documentation system
  • Gain new flexibility during the development process by managing your code within a CVS repository and using the Phing build system
  • Capitalize upon the quality code of others by using the PEAR package management solution

Who this book is for

PHP developers seeking to embrace sound development techniques such as object–orientation, design patterns, testing, and documentation.

Source Code/Downloads

Downloads are available to accompany this book.

Your operating system can likely extract zipped downloads automatically, but you may require software such as WinZip for PC, or StuffIt on a Mac.

Errata

Please Login to submit errata.

On page 64:

On page 64, there is the $methodname mentioned here:

function __call( $methodname, $args ) {
if ( method_exists( $this->writer, $methodname ) ) {
return $this->writer->$methodname( $this );
}
}

But in the code sample on listing 04.16.php, there is this:

function __call( $method, $args ) {
if ( method_exists( $this->writer, $method ) ) {
return $this->writer->$method( $this );
}
}

Looks like this is minor but it helps to keep the names consistent

On page 208:

Login class has a function called detach(). In the book, it says this:

function detach( SplObserver $observer ){
$this->storage->attach( $observer );
}

I think it was meant to be:

function detach( SplObserver $observer ){
$this->storage->detach( $observer );
}