Changeset 850d3cc
- Timestamp:
- 12/18/11 14:33:41 (5 months ago)
- Branches:
- master
- Children:
- ddec066
- Parents:
- 8c44f33
- git-author:
- Michiel Rook <mrook@…> (12/18/11 14:33:41)
- git-committer:
- Michiel Rook <mrook@…> (12/18/11 14:33:41)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
docs/phing_guide/book/chapters/appendixes/AppendixB-CoreTasks.html
rf47b545 r850d3cc 1885 1885 </h2> 1886 1886 <p> 1887 The PhingCallTask calls a target from the same Phing project. A <em><phingcall></em> 1888 tag may contain <em><property></em> tags that define new 1889 properties. In the following example, the properties <em>property1</em> 1890 and <em>foo</em> are defined and only accessible inside the called 1891 target. 1892 </p> 1893 <p> 1894 However, this will only work if the properties are not yet set outside 1887 The PhingCallTask calls a target within the same Phing project. 1888 </p> 1889 1890 <p> 1891 A <em><phingcall></em> tag may contain <em><property></em> 1892 tags that define new properties. These properties are only set if properties 1893 of the same name have not been set outside 1895 1894 the 1896 1895 <code>"phingcall"</code> 1897 1896 tag. 1898 1897 </p> 1898 1899 <p> 1900 <b>Important note about scope:</b> every <em><phingcall></em> tag 1901 creates a new local scope. Thus, any properties or other variables set inside 1902 that scope will cease to exist (or revert to their previous value) once 1903 the <em><phingcall></em> tag completes. 1904 </p> 1905 1899 1906 <h3>Example</h3> 1900 1907 <pre><target name="foo"> … … 1903 1910 <property name="foo" value="baz" /> 1904 1911 </phingcall> 1905 </target> 1906 1907 <target name="bar" depends="init"> 1912 </target></pre> 1913 1914 <p> 1915 In the example above, the properties <em>property1</em> 1916 and <em>foo</em> are defined and only accessible inside the called 1917 target. 1918 </p> 1919 1920 <pre><target name="bar" depends="init"> 1908 1921 <echo message="prop is ${property1} ${foo}" /> 1909 1922 </target></pre> … … 2025 2038 build file. 2026 2039 </p> 2040 2041 <p> 2042 <b>Important note about scope:</b> when the <em><property></em> tag 2043 is called inside a <em><phingcall></em> tag, any properties are 2044 set in a new local scope. Thus, any properties or other variables set inside 2045 that scope will cease to exist (or revert to their previous value) once 2046 the parent <em><phingcall></em> tag completes. 2047 </p> 2048 2027 2049 <h3>Example</h3> 2028 2050 <pre><property name="strings.test" value="Harr harr, more power!" />
Note: See TracChangeset
for help on using the changeset viewer.
