我有一个 phing 构建文件,它使用 <touch> 任务检查某些文件的权限。
<target description="list of files to check permission" name="files-to-test">
<property name="filesToCheck" value=""/>
<php expression="file_get_contents('filesToCheck.txt')" returnProperty="filesToCheck"/>
<foreach list="${filesToCheck}" param="file" target="permission-test"/>
</target>
<target description="Test the permission of files that needs to be written" name="permission-test">
<touch file="${file}"/>
</target>
它调用一个外部文件(filesToCheck.txt),它只是不同文件位置的列表。这工作正常。但是当我想基于来自同一个外部文件(filesToCheck.txt)的某个键访问特定文件时,它会阻止我在我的 PHP 代码中重用相同的列表。
我查看了 Phing 的文档,但没有找到任何数组任务。有谁知道解决方法或创建新任务是在 Phing 中处理数组属性的唯一解决方案?