1<refentry id="{@id}"> 2 <refnamediv> 3 <refname>@name</refname> 4 <refpurpose>Specify an alias to use for a procedural page or global variable in displayed documentation and linking</refpurpose> 5 </refnamediv> 6 <refsynopsisdiv> 7 <refsynopsisdivinfo> 8 <author> 9 Gregory Beaver 10 <authorblurb>Tag Documentation written by {@link mailto:cellog@php.net cellog@php.net}</authorblurb> 11 </author> 12 <copyright>Copyright 2002, Gregory Beaver</copyright> 13 <releaseinfo>phpDocumentor 1.1+</releaseinfo> 14 </refsynopsisdivinfo> 15 <cmdsynopsis> 16 <command>@name</command> 17 <arg choice="req"> 18 <option>$globalvariablename</option> 19 </arg> 20 </cmdsynopsis> 21 </refsynopsisdiv> 22 <refsect1 id="{@id description}"> 23 <title>Description</title> 24 <para>phpDocumentor recognizes the @name tag in global variable DocBlocks (in conjunction with {@tutorial tags.global.pkg}), and uses it to rename a global variable for documentation to make it more readable. A global variable name MUST begin with a dollar sign ($) or phpDocumentor will ignore the tag and raise an error.</para> 25 </refsect1> 26 <refsect1 id="{@id example}"> 27 <title>Example</title> 28 <para>Here's an examples:</para> 29 <para> 30 <programlisting role="php"> 31 <![CDATA[ 32/** 33 * Now, when @global is used in a function, it will link to $baz 34 * @name $baz 35 * @global array $GLOBALS['baz'] 36 */ 37$GLOBALS['baz'] = array('foo','bar'); 38 39/** 40 * @global array used for stuff 41 */ 42function mine() 43{ 44 global $baz; 45} 46 ]]> 47 </programlisting> 48 </para> 49 </refsect1> 50</refentry> 51