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

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -