Previous Up Next
@final phpDocumentor tags @global

@filesource

create a syntax-highlighted cross-referenced file containing source code of the current file and link to it

Gregory Beaver
Tag Documentation written by [email protected]
Copyright 2002, Gregory Beaver
(phpDocumentor 1.2+)
@filesource

Description

The @filesource tag can only be used in a page-level DocBlock, it will be ignored anywhere else. phpDocumentor parses the file source of the current file, and outputs syntax-highlighted source code with line numbers, links to documentation and then adds a link to the generated file in the documentation.

The @example tag serves a similar purpose, but is designed to parse and create a link to an external example file.

@filesource only works with PHP 4.3.0+ due to the use of the tokenizer extension, which was not stable prior to PHP 4.3.0. Go to http://www.php.net and download PHP 4.3.0 to use @filesource

Example

Here's an example:

  1. /**
  2.  * Contains several example classes that I want to parse but I
  3.  * also want to show the full source
  4.  * @package mypackage
  5.  * @subpackage example
  6.  * @filesource
  7.  */
  8. /**
  9.  * This class does things
  10.  * @package mypackage
  11.  * @subpackage example
  12.  */
  13. class oneofmany extends mainclass
  14. {
  15. ...

Previous Up Next
@final phpDocumentor tags @global

Documentation generated on Mon, 05 Dec 2011 21:13:02 -0600 by phpDocumentor 1.4.4