interface - HuggableInterface in PHP and PSR-8 -
on php framework interop group site (the maintainer of psrs), there draft psr-8 huggable interface:
namespace psr\hug; /** * defines huggable object. * * huggable object expresses mutual affection huggable object. */ interface huggable { /** * hugs object. * * hugs mutual. object hugged must in turn hug other * object calling hug() on first parameter. objects must * implement mechanism prevent infinite loop of hugging. * * @param huggable $h * object hugging object. */ public function hug(huggable $h); }
the draft quite short not provide examples of implementation. purpose of implementing interface?
having fun!
see merge date:
crell on apr 1, 2014 merge in interface definitions.
it's joke :) (april fools' day.)
Comments
Post a Comment