Login   Register  
PHP Classes

Null Object: Set objects that do nothing but avoid fatal errors

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

  Author Author  
Picture of Elger van Boxtel
Name: Elger van Boxtel <e-mail contact>
Packages: 2 Browse all classes by Elger van Boxtel Browse all classes by
Country: The Netherlands The Netherlands - PHP jobs in The Netherlands
Age: ???
All time rank: 309288 in The Netherlands The Netherlands
Week rank: 2008 Up62 in The Netherlands The Netherlands Up
Innovation award
Innovation award
Nominee: 1x

  Detailed description   Download Download .zip .tar.gz  
This class can setup objects that do nothing but avoid fatal errors.

It has the magic methods __call and __set that do not do anything but return the class object itself.

This ways the object be used in chained function calls without causing fatal errors.

  Classes of Elger van Boxtel  >  Null Object  >  Download Download .zip .tar.gz  >  Support forum Support forum  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: Null Object
Base name: null-object
Description: Set objects that do nothing but avoid fatal errors
Version: 1.0.0
PHP version: 5.3
License: BSD License
All time users: 239 users
All time rank: 6842
Week users: 0 users
Week rank: 1972 Equal
  Groups   Rate classes User ratings   Applications   Files Files  

Group folder image PHP 5 Classes using PHP 5 specific features View top rated classes
Group folder image Language Constructs to assist in the language control View top rated classes

  Innovation Award  
PHP Programming Innovation award nominee
July 2013
Number 8

Prize: One subscription to the PDF edition of the PHP Architect magazine
Sometimes applications need to pass objects but that do not do anything useful but can handle accesses to functions and variables that do not really exist.

This class can be used for those situations. It provides magic methods that return the class object so it can be used in chained function calls.

Manuel Lemos

  User ratings  
Not yet rated by the users

  Applications that use this class  
No application links were specified for this class.
Add link image If you know an application of this package, send a message to the author to add a link here.
  Files folder image Files  
File Role Description
Plain text file NullObject.php Class NullObject pattern

Download Download all files: null-object.tar.gz null-object.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.