does phing support arrays with keys and values?

做~自己de王妃 提交于 2019-12-11 02:56:12

问题


In phing i can set this:

<property name="build.myArray" value="something1, something2, something3" />

And then retrieve each value like this:

<foreach list="${build.myArray}" param="replace.me" target="build:create-vhost" />

<target name="build:create-vhost">
    <filterchain>
        <replacetokens begintoken="@" endtoken="@">
            <token key="REPLACE_ME" value="${replace.me}" />
        </replacetokens>
    </filterchain>
</target>

My question is can i do the same this but using array with keys and values? Something like that:

<property name="build.myArray" value="myKey = something1, myKey2 => something2, myKey3 => something3" />

and use that key names later

Is is possible to do it?


回答1:


No, you cannot use properties as array in phing.



来源:https://stackoverflow.com/questions/12350718/does-phing-support-arrays-with-keys-and-values

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!