Generic NullObject for PHP
It ignores every method call and property access:
class NullObject {
  public function __call($method, $args) { return $this; }
  public function __get($name) { return $this; }
}Written by Cyber
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
 #Php 
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#
 
 
 
 
