Pass a specific definition into renderClassDefinition()
Pass a specific definition into renderClassDefinition()

When printing definitions, we should only print the classes, methods, and
parameters provided by the current definition. For example, if a DefinitionList
has two definitions -- a RuntimeDefinition and an ArrayDefinition loaded from
an out-of-date compiled definition -- we should print the good info under the
RuntimeDefinition and the stale info under the ArrayDefinition. Passing the
current definition into renderClassDefinition() makes this possible. The
current implementation (before this patch) ignores the current definition and
always queries the DefinitionList for the first definition that has the class
defined. In the earlier example, this would print the good info under the
ArrayDefinition, which is misleading.

This patch also fixes a subtle bug caused by nested calls to the
SplDoublyLinkedList iterator. In the current implementation, the render()
method iterates over the DefinitionList (which extends SplDoublyLinkedList). In
the loop, it calls renderClassDefinition(), which calls the DefinitionList's
getMethods() and getMethodParameters() methods. These methods also iterate over
the DefinitionList, resetting the current position and causing the outer loop
to lose its place. As a result, render() would fail to print all configured
definitions in some cases. This patch doesn't query the DefinitionList in
renderClassDefinition(), so the outer loop should behave as expected.

Techlightenment/zf2,campersau/zf2,campersau/zf2,dvsavenkov/zf2,stefanotorresi/zf2,Techlightenment/zf2,TheBestSoftInTheWorld/zf2,emilgeorgiev89/ZFTEST,huangchaolei55/firstSite,campersau/zf2,nandadotexe/zf2,dkarvounaris/zf2,freax/zf2,vrkansagara/zf2,keradus/zf2,roheim/zf2,coolmic/zf2,inwebo/zf2,desenvuno/zf2,KarimBea/test,dntmartins/zf2,bourkhimehaytam/zf2,artpoplsh/zf2,bullandrock/zf2,samsonasik/zend-stdlib,pepeam/zend,sasezaki/zf2,webmozart/zf2,bullandrock/zf2,taro-asahi/zf2,echampet/zf2,stefanotorresi/zf2,0livier/zf2,david-sann/zf2,samsonasik/zf2,DASPRiD/zf2,david-sann/zf2,echampet/zf2,keradus/zf2,zendframework/zf2,guilherme-santos/zf2,awd-git/zf2,bondvt04/zf2test,peterkokot/zf2,emilgeorgiev89/ZFTEST,svycka/zf2,Sineth-N/zf2,pembo210/zf2,stefanotorresi/zf2,samsonasik/zf2,Heshan-Sandamal/zf2,AICIDNN/zf2,0livier/zf2,sasezaki/zf2,0livier/zf2,prolic/zf2,bondvt04/zf2test,echampet/zf2,zf2timo/zf2,webmozart/zf2,levelfivehub/zf2,Techlightenment/zf2,Techlightenment/zf2,peterkokot/zf2,machnicki/zf2,kanellov/zf2,dntmartins/zf2,dvsavenkov/zf2,sntsikdar/zf2,mikicaivosevic/zf2,mmauri04/zf2,svycka/zf2,dkemper/zf2,KarimBea/test,enjoy2000/zf2,bullandrock/zf2,machnicki/zf2,shitikovkirill/zf2,DASPRiD/zf2,bourkhimehaytam/zf2,samsonasik/zf2,dntmartins/zf2,Techlightenment/zf2,walberjefferson/zf2,mmetayer/zf2,sasezaki/zf2,MadCat34/zf2,Techlightenment/zf2,felipemaksy/zf2,taogb/zf2,roko79/zf2,mpalourdio/zf2,ChrisSchreiber/zf2,noopable/zf2,olearys/zf2,pepeam/zend,Brucewyh/zf2