147 reputation
7
bio website basereality.com
location Sydney, Australia
age 39
visits member for 2 years
seen Dec 13 at 23:44

Coder, photographer, cake baker. My stuff you may be interested in:

Console - A fork of the Symfony/console to allow it to be used with real DI, instead of commands executing the code.

LowMemoryClassloader - A classloader that should be significantly faster than the Composer one, particularly for dynamically generated code.

PHP-To-Javascript - Convert PHP to Javascript automatically, because YOLO.

FlickrGuzzle - A guzzle based implementation of the Flickr api. Well most of it, the parts people use at least.

My fork of Auryn - A fork of Rdlowrey's Auryn, a pure dependency injector, with a few extra spices.


Oct
9
comment Migrating single-layer ORM based app to multi-layer API
Obviously one benefit of an ORM is that you can traverse across different objects e.g. from 'customer' to 'item bought' to 'seller'. Is there a good way of delineating where one composite object ends and the next begins?
Oct
9
asked Migrating single-layer ORM based app to multi-layer API
Jul
17
awarded  Critic
Feb
5
comment Changing method signature for implementing classes in PHP
No - You've missed the point of the question. You can't change function signature, or PHP gives the error "Declaration of WoodProcessor::bar() must be compatible with AbstractProcessor::bar(Item $item)"
Feb
5
comment Changing method signature for implementing classes in PHP
Yes - but it doesn't address the problem that i) the shared methods need to use the base class of 'Item' ii) The type specific methods want to use a sub-class "WoodItem" but that gives an error like "Declaration of WoodProcessor::bar() must be compatible with AbstractProcessor::bar(Item $item)"
Feb
5
comment Changing method signature for implementing classes in PHP
Because the two classes share 80% of their code, which is in the abstract class. Using interfaces would mean either duplicating the code, or a large refactor to move the shared code into another class that could be composited with the two classes.
Feb
5
asked Changing method signature for implementing classes in PHP
Oct
31
asked Should mock objects for tests be created at a high or low level
Jul
12
awarded  Scholar
Jul
12
accepted Non-trivial get function, should it be named differently
Jul
12
awarded  Editor
Jul
12
awarded  Supporter
Jul
12
revised Non-trivial get function, should it be named differently
Clarified return types.
Jul
12
comment Non-trivial get function, should it be named differently
Sorry, I'll clarify it. Both the Command::getResponseFactory and service->getResponseFactory return the same type, a string - which is admittedly another smell.
Jul
12
awarded  Student
Jul
12
comment Non-trivial get function, should it be named differently
"What would you call it?" Maybe 'getEffectiveResponseFactory'? Which kind of sucks.
Jul
12
asked Non-trivial get function, should it be named differently
May
22
answered How do I handle 3rd party search result data (via cache)
May
22
comment How do I handle 3rd party search result data (via cache)
Why is memcache not an option? md5 the request parameters, store the result with the md5 as the key?
May
19
awarded  Teacher