TroodoN-Mike
TroodoN-Mike

Reputation: 16185

does phing support arrays with keys and values?

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?

Upvotes: 2

Views: 867

Answers (1)

cweiske
cweiske

Reputation: 31117

No, you cannot use properties as array in phing.

Upvotes: 1

Related Questions