$B?";3$G$9!#(B<br>$B$^$?<ALd$5$;$F$/$@$5$$!#:#EY$O(BS2Container.PHP5$B$K$D$$$F$G$9!#(B<br clear="all"><br>s2container.php5$B$N(Bexample/dicon/autobinding/$BG[2<$N%U%!%$%k$r=$@5$7$F!"(B<br>FileSystemComponentAutoRegister$B$r;HMQ$9$k%5%s%W%k$r:n$C$F$_$^$7$?!#(B<br>$B$G!"2<5-$N$h$&$K%U%!%$%k$N8!:wBP>]%G%#%l%/%H%j$r#2$D(B(test1,test2)$B@_Dj(B<br>
$B$7$?$H$3$m!"%(%i!<$,H/@8$7$^$7$?!#(B<br><br>$B%a%C%;!<%8FbMF$+$i;!$9$k$K!"(BHashMapImpl$B%/%i%9$r#2EYEPO?$7$F(BMap<br>$B%$%s%?!<%U%'!<%9$r%-!<$H$7$F(BgetComponent()$B$,<B9T$5$l$?$?$a$K%(%i!<(B<br>$B$H$J$C$?LOMM$G$9!#(B<br><br>$B;d$N(Bdicon$B%U%!%$%k5-=RFbMF$K8m$j$,$"$j$^$9$G$7$g$&$+!)(B<br>FileSystemComponentAutoRegister$B$r;HMQ$9$k:]$K2?$i$+$N@)Ls;v9`$,$"$k$N(B<br>$B$G$7$g$&$+!)(B
<br><br>$B65$($F$/$@$5$$!#$h$m$7$/$*4j$$$7$^$9!#(B<br><br>$B0J>e$G$9!#(B<br><br>---------$B!Z0J2<!";29M![(B------<br><br>----[$B%U%!%$%k$N9=@.(B]----<br>helloworlderror/<br> index.php<br> xxxxx.dicon<br> components21.dtd<br> ($BN,!K(B<br> test1/<br> Map.class.php
<br> HashMapImpl.class.php<br> test2/<br> ($B%U%!%$%k$J$7!K(B<br><br>-------[$B;HMQ$7$?(Bdicon$B%U%!%$%k(B]---------<br><?xml version="1.0" encoding="Shift_JIS"?><br><!DOCTYPE components PUBLIC "-//SEASAR//DTD S2Container//EN"
<br>"components21.dtd"><br><components><br> <component class="S2Container_FileSystemComponentAutoRegister"><br> <property name="instanceMode">"singleton"</property>
<br> <initMethod name="addClassPattern"><br> <arg>"%APP_BASE_PATH%/test1"</arg><br> <arg>".+Impl"</arg><br> </initMethod>
<br> <initMethod name="addClassPattern"><br> <arg>"%APP_BASE_PATH%/test2"</arg><br> <arg>".+Impl"</arg><br> </initMethod>
<br> <initMethod name="registerAll"/><br> </component><br> <component autoBinding="auto" class="AutoHelloSetterInjection"/><br></components><br><br>-----[$B<B9T$7$?%3!<%I(B]-----
<br>($BN,!K(B<br>require_once('Hello.class.php');<br>require_once('test1/Map.class.php');<br>require_once('test1/HashMapImpl.class.php');<br>require_once('AutoHelloSetterInjection.class.php');<br><br>$PATH = APP_BASE_PATH . "/AutoHelloSetterInjectionError.dicon";
<br> <br>$container = S2ContainerFactory::create($PATH);<br>$container->init();<br>$hello = $container->getComponent('Hello');<br>$hello->showMessage();<br><br>----[$B=PNO$5$l$?%(%i!<%a%C%;!<%8(B]----<br><br><b>Fatal error
</b>: Uncaught exception
'S2Container_TooManyRegistrationRuntimeException' with message 'Two or
more components<HashMapImpl, HashMapImpl> are registered in Map'
in
/home/ueyama/lib/s2container.php5/build/s2container.php5/S2Container/S2Container_TooManyRegistrationComponentDefImpl.class.php:64
Stack trace:
#0
/home/ueyama/lib/s2container.php5/build/s2container.php5/s2container.core.classes.php(119):
S2Container_TooManyRegistrationComponentDefImpl->getComponent()
#1
/home/ueyama/lib/s2container.php5/build/s2container.php5/s2container.core.classes.php(2004):
S2ContainerImpl->getComponent('Map')
#2
/home/ueyama/lib/s2container.php5/build/s2container.php5/s2container.core.classes.php(1624):
S2Container_AutoPropertyAssembler->assemble(Object(AutoHelloSetterInjection))
#3
/home/ueyama/lib/s2container.php5/build/s2container.php5/s2container.core.classes.php(1607):
S2Container_SingletonComponentDeployer->_assemble()
#4
/home/ueyama/lib/s2container.php5/build/s2container.php5/s2container.core.classes.php(1629):
S2Container_S in <b>/home/ueyama/lib/s2container.php5/build/s2container.php5/S2Container/S2Container_TooManyRegistrationComponentDefImpl.class.php</b> on line <b>64<br><br><span style="font-weight: bold;"><span style="font-weight: bold;">
</span></span></b><br>-- <br>------------------------------------------------------------------<br> $B?";3!!G=@.(B@$BJ!2,(B<br>$B!!(Bmailto:<a href="mailto:ueyama@gmail.com">ueyama@gmail.com</a><br>------------------------------------------------------------------
<br>