DoclerLabs / hexMachina

Releases, issues, documentation, website of hexMachina, framework written in Haxe
http://hexmachina.org
MIT License
44 stars 8 forks source link

Possibility of interacting with an instance after its construction from xml dsl #197

Closed FrancisBourre closed 7 years ago

FrancisBourre commented 7 years ago

This feature would allow to interact with any instance inside the DSL after its construction:

For now, it's only possible to do it in the same xml node of the instantiation, like below:

<root name="applicationContext">

    <caller id="caller" type="hex.ioc.parser.xml.mock.MockCaller">
        <method-call name="call">
            <argument value="hello"/>
            <argument value="world"/>
        </method-call>
    </caller>

</root>

With this feature, you can do it at nay time from any file:

<root name="applicationContext">

    <caller id="caller" type="hex.ioc.parser.xml.mock.MockCaller"/>

</root>

<root name="applicationContext">

    <caller ref="caller">
        <method-call name="call">
            <argument value="hello"/>
            <argument value="world"/>
        </method-call>
    </caller>

</root>