Patrick Schaaf wrote:

> Am 15.02.2015 21:05 schrieb "Rowan Collins" <rowan.coll...@gmail.com>:
> 
>> // Now wherever in the code you want the default instance, just use this:
>> $value = MyRedis::singleton()->get($key);
> 
> You can surely see how this is more readable / easier to write:
> 
> $value = MyRedir::get($key);

It's possible to add static methods or use __callStatic() to delegate to
the singleton's instance methods, though.

-- 
Christoph M. Becker


-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to