phpphing

Phing Property in property file should contain multiple values


As far as I know it is not posssible to have an array of values in a property file. What would be the best solution to store multiple values in a property?

e.g. part of property file

# directory definitions 
# containing e.g. CSS, Javascript, ...
project.dirname_css = css
project.dirname_js = javascript

What I want is an array of properties like:

# directory definitions 
# containing e.g. CSS, Javascript, ...
project.dirname_css = [css,portal_specific]
project.dirname_js = [javascript,portal_specific]

to loop them in the build.xml
Any suggestions how to do this?
I could imagine to do divide values by ; and explode them in the build.xml. Any better suggestions?


Solution

  • project.dirname_css = foo,bar,baz
    

    And you will be able to iterate them with the phing forearch task :)

    See: https://www.phing.info/guide/chunkhtml/ForeachTask.html