Jochem Maas wrote:
Op 3/10/10 1:29 PM, Auke van Slooten schreef:
Hi,
In a hobby project I'm relying on the order in which the following piece
of PHP code is executed:
$client->system->multiCall(
$client->methodOne(),
$client->methodTwo()
);
but who cares. the code is full of magic, which makes it difficult to understand
and maintain ... fix it so that it's explicit about what it's doing so that
other developers who read it will grasp the concept without having to dig
into your magic methods. this solves the problem of undiscernable magic and
possible issues with resolution order in the future as well (which if they
happened would be a royal PITA to debug, given the magic methods involved)
I've decided to rewrite the API so it is more upfront about what it
does. Your argument about readability, when the API is unknown, is a
valid one. It now works like this:
$client->system->multiCall(
ripcord::encodeCall('methodOne'),
ripcord::encodeCall('methodTwo')
);
Thanks for all your input,
Auke van Slooten
Muze
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php