3 * Linking to element documentation is performed by the classes in this file.
\r
5 * abstractLink descendants contain enough information to differentiate every
\r
6 * documentable element, and so can be converted to a link string by
\r
7 * {@link Converter::returnSee()}
\r
9 * phpDocumentor :: automatic documentation generator
\r
11 * PHP versions 4 and 5
\r
13 * Copyright (c) 2002-2006 Gregory Beaver
\r
17 * This library is free software; you can redistribute it
\r
18 * and/or modify it under the terms of the GNU Lesser General
\r
19 * Public License as published by the Free Software Foundation;
\r
20 * either version 2.1 of the License, or (at your option) any
\r
23 * This library is distributed in the hope that it will be useful,
\r
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
\r
26 * Lesser General Public License for more details.
\r
28 * You should have received a copy of the GNU Lesser General Public
\r
29 * License along with this library; if not, write to the Free Software
\r
30 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
\r
32 * @package phpDocumentor
\r
34 * @author Gregory Beaver <cellog@php.net>
\r
35 * @copyright 2002-2006 Gregory Beaver
\r
36 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
\r
37 * @version CVS: $Id: LinkClasses.inc,v 1.3 2006/04/30 22:18:13 cellog Exp $
\r
39 * @link http://www.phpdoc.org
\r
40 * @link http://pear.php.net/PhpDocumentor
\r
45 * linking classes parent
\r
46 * @package phpDocumentor
\r
51 /**#@+ @var string */
\r
54 * phpdoc alias _phpdoc_inc for phpdoc.inc
\r
56 var $fileAlias = '';
\r
58 * element type linked to.
\r
59 * can only be a documentable element
\r
65 var $subpackage = '';
\r
69 * @param string full path to file containing element
\r
70 * @param string page name, as configured by {@link Parser::parse}
\r
71 * @param string element name
\r
72 * @param string package element is in
\r
73 * @param string subpackage element is in
\r
74 * @param string optional category that documentation is in
\r
76 function addLink($path, $fileAlias, $name, $package, $subpackage, $category = false)
\r
78 $this->path = $path;
\r
79 $this->fileAlias = $fileAlias;
\r
80 $this->name = $name;
\r
81 $this->category = $category;
\r
82 $this->package = $package;
\r
83 $this->subpackage = $subpackage;
\r
88 * procedural page link
\r
89 * @package phpDocumentor
\r
92 class pageLink extends abstractLink
\r
100 * @package phpDocumentor
\r
101 * @subpackage Links
\r
103 class functionLink extends abstractLink
\r
106 var $type = 'function';
\r
111 * @package phpDocumentor
\r
112 * @subpackage Links
\r
114 class defineLink extends abstractLink
\r
117 var $type = 'define';
\r
121 * global variable link
\r
122 * @package phpDocumentor
\r
123 * @subpackage Links
\r
125 class globalLink extends abstractLink
\r
128 var $type = 'global';
\r
133 * @package phpDocumentor
\r
134 * @subpackage Links
\r
136 class classLink extends abstractLink
\r
139 var $type = 'class';
\r
144 * @package phpDocumentor
\r
145 * @subpackage Links
\r
147 class methodLink extends abstractLink
\r
150 var $type = 'method';
\r
155 * @param string class name
\r
156 * @param string full path to file containing element
\r
157 * @param string page name, as configured by {@link Parser::parse}
\r
158 * @param string element name
\r
159 * @param string package element is in
\r
160 * @param string subpackage element is in
\r
162 function addLink($class, $path ,$fileAlias,$name,$package,$subpackage, $category = false)
\r
164 $this->class = $class;
\r
165 abstractLink::addLink($path, $fileAlias,$name,$package,$subpackage, $category);
\r
170 * class variable link
\r
171 * @package phpDocumentor
\r
172 * @subpackage Links
\r
174 class varLink extends methodLink
\r
181 * class constant link
\r
182 * @package phpDocumentor
\r
183 * @subpackage Links
\r
185 class constLink extends methodLink
\r
188 var $type = 'const';
\r
193 * @package phpDocumentor
\r
194 * @subpackage Links
\r
196 class tutorialLink extends abstractLink
\r
198 /**#@+ @var string */
\r
199 var $type = 'tutorial';
\r
201 var $title = false;
\r
205 * @param string section/subsection name
\r
206 * @param string full path to file containing element
\r
207 * @param string page name, as configured by {@link Parser::parse}
\r
208 * @param string element name
\r
209 * @param string package element is in
\r
210 * @param string subpackage element is in
\r
211 * @param string title of tutorial
\r
213 function addLink($section,$path,$name,$package,$subpackage,$title = false, $category = false)
\r
215 $this->section = $section;
\r
216 $this->title = $title;
\r
217 parent::addLink($path,'',$name,$package,$subpackage, $category);
\r