| 1 |
lars |
1 |
<?php
|
|
|
2 |
/**
|
|
|
3 |
* Linking to element documentation is performed by the classes in this file.
|
|
|
4 |
*
|
|
|
5 |
* abstractLink descendants contain enough information to differentiate every
|
|
|
6 |
* documentable element, and so can be converted to a link string by
|
|
|
7 |
* {@link Converter::returnSee()}
|
|
|
8 |
*
|
|
|
9 |
* phpDocumentor :: automatic documentation generator
|
|
|
10 |
*
|
|
|
11 |
* PHP versions 4 and 5
|
|
|
12 |
*
|
|
|
13 |
* Copyright (c) 2002-2008 Gregory Beaver
|
|
|
14 |
*
|
|
|
15 |
* LICENSE:
|
|
|
16 |
*
|
|
|
17 |
* This library is free software; you can redistribute it
|
|
|
18 |
* and/or modify it under the terms of the GNU Lesser General
|
|
|
19 |
* Public License as published by the Free Software Foundation;
|
|
|
20 |
* either version 2.1 of the License, or (at your option) any
|
|
|
21 |
* later version.
|
|
|
22 |
*
|
|
|
23 |
* This library is distributed in the hope that it will be useful,
|
|
|
24 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
25 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
26 |
* Lesser General Public License for more details.
|
|
|
27 |
*
|
|
|
28 |
* You should have received a copy of the GNU Lesser General Public
|
|
|
29 |
* License along with this library; if not, write to the Free Software
|
|
|
30 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
31 |
*
|
|
|
32 |
* @category ToolsAndUtilities
|
|
|
33 |
* @package phpDocumentor
|
|
|
34 |
* @subpackage Links
|
|
|
35 |
* @author Gregory Beaver <cellog@php.net>
|
|
|
36 |
* @copyright 2002-2008 Gregory Beaver
|
|
|
37 |
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
|
|
|
38 |
* @version CVS: $Id: LinkClasses.inc 253641 2008-02-24 02:35:44Z ashnazg $
|
|
|
39 |
* @filesource
|
|
|
40 |
* @link http://www.phpdoc.org
|
|
|
41 |
* @link http://pear.php.net/PhpDocumentor
|
|
|
42 |
* @since 1.2.0
|
|
|
43 |
* @todo CS cleanup - change package to PhpDocumentor
|
|
|
44 |
*/
|
|
|
45 |
|
|
|
46 |
/**
|
|
|
47 |
* linking classes parent
|
|
|
48 |
*
|
|
|
49 |
* @category ToolsAndUtilities
|
|
|
50 |
* @package phpDocumentor
|
|
|
51 |
* @subpackage Links
|
|
|
52 |
* @author Gregory Beaver <cellog@php.net>
|
|
|
53 |
* @copyright 2002-2008 Gregory Beaver
|
|
|
54 |
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
|
|
|
55 |
* @version Release: 1.4.3
|
|
|
56 |
* @link http://www.phpdoc.org
|
|
|
57 |
* @link http://pear.php.net/PhpDocumentor
|
|
|
58 |
* @todo CS cleanup - change package to PhpDocumentor
|
|
|
59 |
* @todo CS cleanup - change classname to PhpDocumentor_*
|
|
|
60 |
*/
|
|
|
61 |
class abstractLink
|
|
|
62 |
{
|
|
|
63 |
/**#@+
|
|
|
64 |
* @var string
|
|
|
65 |
*/
|
|
|
66 |
var $path;
|
|
|
67 |
/**
|
|
|
68 |
* phpdoc alias _phpdoc_inc for phpdoc.inc
|
|
|
69 |
*/
|
|
|
70 |
var $fileAlias = '';
|
|
|
71 |
/**
|
|
|
72 |
* element type linked to.
|
|
|
73 |
* can only be a documentable element
|
|
|
74 |
*/
|
|
|
75 |
var $type = '';
|
|
|
76 |
var $name = '';
|
|
|
77 |
var $category = '';
|
|
|
78 |
var $package = '';
|
|
|
79 |
var $subpackage = '';
|
|
|
80 |
/**#@-*/
|
|
|
81 |
|
|
|
82 |
/**
|
|
|
83 |
* sets up the link
|
|
|
84 |
*
|
|
|
85 |
* @param string $path full path to file containing element
|
|
|
86 |
* @param string $fileAlias page name, as configured by {@link Parser::parse}
|
|
|
87 |
* @param string $name element name
|
|
|
88 |
* @param string $package package element is in
|
|
|
89 |
* @param string $subpackage subpackage element is in
|
|
|
90 |
* @param string $category optional category that documentation is in
|
|
|
91 |
*
|
|
|
92 |
* @return void
|
|
|
93 |
*/
|
|
|
94 |
function addLink($path, $fileAlias, $name, $package, $subpackage,
|
|
|
95 |
$category = false)
|
|
|
96 |
{
|
|
|
97 |
$this->path = $path;
|
|
|
98 |
$this->fileAlias = $fileAlias;
|
|
|
99 |
$this->name = $name;
|
|
|
100 |
$this->category = $category;
|
|
|
101 |
$this->package = $package;
|
|
|
102 |
$this->subpackage = $subpackage;
|
|
|
103 |
}
|
|
|
104 |
}
|
|
|
105 |
|
|
|
106 |
/**
|
|
|
107 |
* procedural page link
|
|
|
108 |
*
|
|
|
109 |
* @category ToolsAndUtilities
|
|
|
110 |
* @package phpDocumentor
|
|
|
111 |
* @subpackage Links
|
|
|
112 |
* @author Gregory Beaver <cellog@php.net>
|
|
|
113 |
* @copyright 2002-2008 Gregory Beaver
|
|
|
114 |
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
|
|
|
115 |
* @version Release: 1.4.3
|
|
|
116 |
* @link http://www.phpdoc.org
|
|
|
117 |
* @link http://pear.php.net/PhpDocumentor
|
|
|
118 |
* @todo CS cleanup - change package to PhpDocumentor
|
|
|
119 |
* @todo CS cleanup - change classname to PhpDocumentor_*
|
|
|
120 |
*/
|
|
|
121 |
class pageLink extends abstractLink
|
|
|
122 |
{
|
|
|
123 |
/**
|
|
|
124 |
* @var string
|
|
|
125 |
*/
|
|
|
126 |
var $type = 'page';
|
|
|
127 |
}
|
|
|
128 |
|
|
|
129 |
/**
|
|
|
130 |
* function link
|
|
|
131 |
*
|
|
|
132 |
* @category ToolsAndUtilities
|
|
|
133 |
* @package phpDocumentor
|
|
|
134 |
* @subpackage Links
|
|
|
135 |
* @author Gregory Beaver <cellog@php.net>
|
|
|
136 |
* @copyright 2002-2008 Gregory Beaver
|
|
|
137 |
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
|
|
|
138 |
* @version Release: 1.4.3
|
|
|
139 |
* @link http://www.phpdoc.org
|
|
|
140 |
* @link http://pear.php.net/PhpDocumentor
|
|
|
141 |
* @todo CS cleanup - change package to PhpDocumentor
|
|
|
142 |
* @todo CS cleanup - change classname to PhpDocumentor_*
|
|
|
143 |
*/
|
|
|
144 |
class functionLink extends abstractLink
|
|
|
145 |
{
|
|
|
146 |
/**
|
|
|
147 |
* @var string
|
|
|
148 |
*/
|
|
|
149 |
var $type = 'function';
|
|
|
150 |
}
|
|
|
151 |
|
|
|
152 |
/**
|
|
|
153 |
* define link
|
|
|
154 |
*
|
|
|
155 |
* @category ToolsAndUtilities
|
|
|
156 |
* @package phpDocumentor
|
|
|
157 |
* @subpackage Links
|
|
|
158 |
* @author Gregory Beaver <cellog@php.net>
|
|
|
159 |
* @copyright 2002-2008 Gregory Beaver
|
|
|
160 |
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
|
|
|
161 |
* @version Release: 1.4.3
|
|
|
162 |
* @link http://www.phpdoc.org
|
|
|
163 |
* @link http://pear.php.net/PhpDocumentor
|
|
|
164 |
* @todo CS cleanup - change package to PhpDocumentor
|
|
|
165 |
* @todo CS cleanup - change classname to PhpDocumentor_*
|
|
|
166 |
*/
|
|
|
167 |
class defineLink extends abstractLink
|
|
|
168 |
{
|
|
|
169 |
/**
|
|
|
170 |
* @var string
|
|
|
171 |
*/
|
|
|
172 |
var $type = 'define';
|
|
|
173 |
}
|
|
|
174 |
|
|
|
175 |
/**
|
|
|
176 |
* global variable link
|
|
|
177 |
*
|
|
|
178 |
* @category ToolsAndUtilities
|
|
|
179 |
* @package phpDocumentor
|
|
|
180 |
* @subpackage Links
|
|
|
181 |
* @author Gregory Beaver <cellog@php.net>
|
|
|
182 |
* @copyright 2002-2008 Gregory Beaver
|
|
|
183 |
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
|
|
|
184 |
* @version Release: 1.4.3
|
|
|
185 |
* @link http://www.phpdoc.org
|
|
|
186 |
* @link http://pear.php.net/PhpDocumentor
|
|
|
187 |
* @todo CS cleanup - change package to PhpDocumentor
|
|
|
188 |
* @todo CS cleanup - change classname to PhpDocumentor_*
|
|
|
189 |
*/
|
|
|
190 |
class globalLink extends abstractLink
|
|
|
191 |
{
|
|
|
192 |
/**
|
|
|
193 |
* @var string
|
|
|
194 |
*/
|
|
|
195 |
var $type = 'global';
|
|
|
196 |
}
|
|
|
197 |
|
|
|
198 |
/**
|
|
|
199 |
* class link
|
|
|
200 |
*
|
|
|
201 |
* @category ToolsAndUtilities
|
|
|
202 |
* @package phpDocumentor
|
|
|
203 |
* @subpackage Links
|
|
|
204 |
* @author Gregory Beaver <cellog@php.net>
|
|
|
205 |
* @copyright 2002-2008 Gregory Beaver
|
|
|
206 |
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
|
|
|
207 |
* @version Release: 1.4.3
|
|
|
208 |
* @link http://www.phpdoc.org
|
|
|
209 |
* @link http://pear.php.net/PhpDocumentor
|
|
|
210 |
* @todo CS cleanup - change package to PhpDocumentor
|
|
|
211 |
* @todo CS cleanup - change classname to PhpDocumentor_*
|
|
|
212 |
*/
|
|
|
213 |
class classLink extends abstractLink
|
|
|
214 |
{
|
|
|
215 |
/**
|
|
|
216 |
* @var string
|
|
|
217 |
*/
|
|
|
218 |
var $type = 'class';
|
|
|
219 |
}
|
|
|
220 |
|
|
|
221 |
/**
|
|
|
222 |
* method link
|
|
|
223 |
*
|
|
|
224 |
* @category ToolsAndUtilities
|
|
|
225 |
* @package phpDocumentor
|
|
|
226 |
* @subpackage Links
|
|
|
227 |
* @author Gregory Beaver <cellog@php.net>
|
|
|
228 |
* @copyright 2002-2008 Gregory Beaver
|
|
|
229 |
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
|
|
|
230 |
* @version Release: 1.4.3
|
|
|
231 |
* @link http://www.phpdoc.org
|
|
|
232 |
* @link http://pear.php.net/PhpDocumentor
|
|
|
233 |
* @todo CS cleanup - change package to PhpDocumentor
|
|
|
234 |
* @todo CS cleanup - change classname to PhpDocumentor_*
|
|
|
235 |
*/
|
|
|
236 |
class methodLink extends abstractLink
|
|
|
237 |
{
|
|
|
238 |
/**
|
|
|
239 |
* @var string
|
|
|
240 |
*/
|
|
|
241 |
var $type = 'method';
|
|
|
242 |
/**
|
|
|
243 |
* @var string
|
|
|
244 |
*/
|
|
|
245 |
var $class = '';
|
|
|
246 |
|
|
|
247 |
/**
|
|
|
248 |
* sets up the link
|
|
|
249 |
*
|
|
|
250 |
* @param string $class class name
|
|
|
251 |
* @param string $path full path to file containing element
|
|
|
252 |
* @param string $fileAlias page name, as configured by {@link Parser::parse}
|
|
|
253 |
* @param string $name element name
|
|
|
254 |
* @param string $package package element is in
|
|
|
255 |
* @param string $subpackage subpackage element is in
|
|
|
256 |
* @param string $category optional category that documentation is in
|
|
|
257 |
*
|
|
|
258 |
* @return void
|
|
|
259 |
*/
|
|
|
260 |
function addLink($class, $path , $fileAlias, $name, $package, $subpackage,
|
|
|
261 |
$category = false)
|
|
|
262 |
{
|
|
|
263 |
$this->class = $class;
|
|
|
264 |
abstractLink::addLink($path, $fileAlias, $name, $package, $subpackage,
|
|
|
265 |
$category);
|
|
|
266 |
}
|
|
|
267 |
}
|
|
|
268 |
|
|
|
269 |
/**
|
|
|
270 |
* class variable link
|
|
|
271 |
*
|
|
|
272 |
* @category ToolsAndUtilities
|
|
|
273 |
* @package phpDocumentor
|
|
|
274 |
* @subpackage Links
|
|
|
275 |
* @author Gregory Beaver <cellog@php.net>
|
|
|
276 |
* @copyright 2002-2008 Gregory Beaver
|
|
|
277 |
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
|
|
|
278 |
* @version Release: 1.4.3
|
|
|
279 |
* @link http://www.phpdoc.org
|
|
|
280 |
* @link http://pear.php.net/PhpDocumentor
|
|
|
281 |
* @todo CS cleanup - change package to PhpDocumentor
|
|
|
282 |
* @todo CS cleanup - change classname to PhpDocumentor_*
|
|
|
283 |
*/
|
|
|
284 |
class varLink extends methodLink
|
|
|
285 |
{
|
|
|
286 |
/**
|
|
|
287 |
* @var string
|
|
|
288 |
*/
|
|
|
289 |
var $type = 'var';
|
|
|
290 |
}
|
|
|
291 |
|
|
|
292 |
/**
|
|
|
293 |
* class constant link
|
|
|
294 |
*
|
|
|
295 |
* @category ToolsAndUtilities
|
|
|
296 |
* @package phpDocumentor
|
|
|
297 |
* @subpackage Links
|
|
|
298 |
* @author Gregory Beaver <cellog@php.net>
|
|
|
299 |
* @copyright 2002-2008 Gregory Beaver
|
|
|
300 |
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
|
|
|
301 |
* @version Release: 1.4.3
|
|
|
302 |
* @link http://www.phpdoc.org
|
|
|
303 |
* @link http://pear.php.net/PhpDocumentor
|
|
|
304 |
* @todo CS cleanup - change package to PhpDocumentor
|
|
|
305 |
* @todo CS cleanup - change classname to PhpDocumentor_*
|
|
|
306 |
*/
|
|
|
307 |
class constLink extends methodLink
|
|
|
308 |
{
|
|
|
309 |
/**
|
|
|
310 |
* @var string
|
|
|
311 |
*/
|
|
|
312 |
var $type = 'const';
|
|
|
313 |
}
|
|
|
314 |
|
|
|
315 |
/**
|
|
|
316 |
* tutorial link
|
|
|
317 |
*
|
|
|
318 |
* @category ToolsAndUtilities
|
|
|
319 |
* @package phpDocumentor
|
|
|
320 |
* @subpackage Links
|
|
|
321 |
* @author Gregory Beaver <cellog@php.net>
|
|
|
322 |
* @copyright 2002-2008 Gregory Beaver
|
|
|
323 |
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
|
|
|
324 |
* @version Release: 1.4.3
|
|
|
325 |
* @link http://www.phpdoc.org
|
|
|
326 |
* @link http://pear.php.net/PhpDocumentor
|
|
|
327 |
* @todo CS cleanup - change package to PhpDocumentor
|
|
|
328 |
* @todo CS cleanup - change classname to PhpDocumentor_*
|
|
|
329 |
*/
|
|
|
330 |
class tutorialLink extends abstractLink
|
|
|
331 |
{
|
|
|
332 |
/**#@+
|
|
|
333 |
* @var string
|
|
|
334 |
*/
|
|
|
335 |
var $type = 'tutorial';
|
|
|
336 |
var $section = '';
|
|
|
337 |
var $title = false;
|
|
|
338 |
/**#@-*/
|
|
|
339 |
|
|
|
340 |
/**
|
|
|
341 |
* sets up the link
|
|
|
342 |
*
|
|
|
343 |
* @param string $section section/subsection name
|
|
|
344 |
* @param string $path full path to file containing element
|
|
|
345 |
* @param string $name page name, as configured by {@link Parser::parse}
|
|
|
346 |
* @param string $package package element is in
|
|
|
347 |
* @param string $subpackage subpackage element is in
|
|
|
348 |
* @param string $title title of tutorial
|
|
|
349 |
* @param string $category optional category that documentation is in
|
|
|
350 |
*
|
|
|
351 |
* @return void
|
|
|
352 |
*/
|
|
|
353 |
function addLink($section, $path, $name, $package, $subpackage, $title = false,
|
|
|
354 |
$category = false)
|
|
|
355 |
{
|
|
|
356 |
$this->section = $section;
|
|
|
357 |
$this->title = $title;
|
|
|
358 |
parent::addLink($path, '', $name, $package, $subpackage, $category);
|
|
|
359 |
}
|
|
|
360 |
}
|
|
|
361 |
?>
|