phpDocumentor
[ class tree: phpDocumentor ] [ index: phpDocumentor ] [ all elements ]

inline {@link}

Display a link to a URL, or link to an element's documentation in the the flow of descriptive text

Gregory Beaver
Tag Documentation written by cellog@php.net
Copyright 2002, Gregory Beaver
(phpDocumentor 0.4+)
{@link URL description }
{@link element description }

Description

The inline {@link} tag is used to document any element (page, global variable, include, class, function, define, method, variable).

New in version 1.2: You can link to any defined function in the current php version using the function's name. This linking is done using the standard php function http://www.php.net/get_defined_functions, and so relies on the version of php that is used to execute phpDocumentor. A benefit of this method is that the function highlighting will automatically upgrade with a php upgrade without any change to the underlying code. You may also link directly to any portion of the php website using the fake package override PHP_MANUAL (as in PHP_MANUAL#get_defined_functions, or PHP_MANUAL#support.php).

inline {@link} displays links directly in the natural text flow of a DocBlock. If you want to display links prominently after descriptive text, use @see or @link.

For parameter information, see @see or @link. The guidelines for giving the element name to inline @link are the same as outlined in the @see manual page.

Example

The inline {@link} differs from ordinary non-inline tags. Inline tags parse and display their output directly in the documentation. In other words, this DocBlock:

  1. /**
  2.  * Text with a normal @see and @link tag
  3.  * (the parentheses in "element()" are only necessary
  4.  * because it is a function)
  5.  * @see element()
  6.  * @link http://www.example.com
  7.  */
  8. function element()
  9. {
  10. }

Parses as (with -o HTML:frames:default):

  1. <H3>element</H3>
  2. <P><B>element ( )</B></P>
  3. <!-- ========== Info from phpDoc block ========= -->
  4. <b></b>
  5. <pre>
  6. Text with a normal @see and @link tag (the parentheses in "element()" are only necessary because it is a function)
  7. </pre>
  8. <DL>
  9.     <DT>Function Parameters:</DT>
  10.    
  11.  
  12.     <DT>Function Info:</DT>
  13.     <DD><b>See</b> - <CODE><a href="../default/_fake_page_php.html#element">element()</a></CODE></DD>
  14.     <DD><b>Link</b> - <CODE><a href="www.example.com">www.example.com</a></CODE></DD>
  15.    
  16. </DL>
  17.  
  18. <HR>

  1. /**
  2.  * Text with an {@link http://www.example.com Inline Link to a Hyperlink} and an inline
  3.  * link to {@link element()} displays without a break in the flow
  4.  * (again, the parentheses in "element()" are only necessary
  5.  * because it is a function)
  6.  */
  7. function element()
  8. {
  9. }

Parses as (with -o HTML:frames:default):

  1. <H3>element</H3>
  2. <P><B>element ( )</B></P>
  3. <!-- ========== Info from phpDoc block ========= -->
  4. <b></b>
  5. <pre>
  6. Text with an <a href="http://www.example.com">Inline Link to a Hyperlink</a> and
  7. an inline link to <a href="../default/_fake_page_php.html#element">element()</a>
  8. displays without a break in the flow (again, the parentheses in "element()" are only necessary
  9. because it is a function)
  10. </pre>
  11. <DL>
  12.     <DT>Function Parameters:</DT>
  13.    
  14.  
  15.     <DT>Function Info:</DT>
  16.    
  17. </DL>
  18.  
  19. <HR>

Выше
inline {@inheritdoc} phpDocumentor Inline tags inline {@source}
    Поддержать сайт на родительском проекте КГБ