1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
|
{layout '@layout.latte'}
{var $active = 'class'}
{block title}{if $class->deprecated}Deprecated {/if}{if $class->interface}Interface{elseif $class->trait}Trait{else}Class{/if} {$class->name}{/block}
{block content}
<div id="content" class="class">
<h1 n:class="$class->deprecated ? deprecated">{if $class->interface}Interface{elseif $class->trait}Trait{else}Class{/if} {$class->shortName}</h1>
{if $class->valid}
<div class="description" n:if="$template->longDescription($class)">
{$class|longDescription|noescape}
</div>
<dl class="tree" n:if="$class->parentClass || $class->ownInterfaces || $class->ownTraits">
<dd n:foreach="$tree as $item" style="padding-left:{($iterator->counter - 1) * 30}px">
<img src="resources/inherit.png" alt="Extended by" n:if="$iterator->counter > 1">
{if $item->documented}
<a href="{$item|classUrl}" n:tag-if="!$iterator->last">{last}<b>{/last}<span n:class="$item->deprecated ? deprecated, !$item->valid ? invalid">{$item->name}</span>{last}</b>{/last}</a>
{else}{$item->name}{/if}
{var $itemOwnInterfaces = $item->ownInterfaces}
{if $itemOwnInterfaces} implements {foreach $itemOwnInterfaces as $interface}
<a href="{$interface|classUrl}" n:tag-if="$interface->documented"><span n:class="$interface->deprecated ? deprecated, !$interface->valid ? invalid">{$interface->name}</span></a>{sep}, {/sep}
{/foreach}{/if}
{var $itemOwnTraits = $item->ownTraits}
{if $itemOwnTraits} uses {foreach $itemOwnTraits as $trait}
{if is_string($trait)}
{$trait} (not available)
{else}
<a href="{$trait|classUrl}" n:tag-if="$trait->documented"><span n:class="$trait->deprecated ? deprecated, !$trait->valid ? invalid">{$trait->name}</span></a>{sep}, {/sep}
{/}
{/foreach}{/if}
</dd>
</dl>
{define children}
{foreach $children as $child}
<a href="{$child|classUrl}" n:tag-if="$child->documented"><span n:tag-if="$child->deprecated" class="deprecated">{$child->name}</span></a>{sep}, {/sep}
{/foreach}
{/define}
<div n:if="$directSubClasses">
<h4>Direct known subclasses</h4>
{include children, children => $directSubClasses}
</div>
<div n:if="$indirectSubClasses">
<h4>Indirect known subclasses</h4>
{include children, children => $indirectSubClasses}
</div>
<div n:if="$directImplementers">
<h4>Direct known implementers</h4>
{include children, children => $directImplementers}
</div>
<div n:if="$indirectImplementers">
<h4>Indirect known implementers</h4>
{include children, children => $indirectImplementers}
</div>
<div n:if="$directUsers">
<h4>Direct Known Users</h4>
{include children, children => $directUsers}
</div>
<div n:if="$indirectUsers">
<h4>Indirect Known Users</h4>
{include children, children => $indirectUsers}
</div>
<div class="info">
{if !$class->interface && !$class->trait && ($class->abstract || $class->final)}<b>{if $class->abstract}Abstract{else}Final{/if}</b><br>{/if}
{if $class->internal}<b>PHP Extension:</b> <a href="{$class->extension|manualUrl}" title="Go to PHP documentation">{$class->extension->name|firstUpper}</a><br>{/if}
{if $class->inNamespace()}<b>Namespace:</b> {$class->namespaceName|namespaceLinks|noescape}<br>{/if}
{if $class->inPackage()}<b>Package:</b> {$class->packageName|packageLinks|noescape}<br>{/if}
{foreach $template->annotationSort($template->annotationFilter($class->annotations)) as $annotation => $values}
{foreach $values as $value}
<b>{$annotation|annotationBeautify}{if $value}:{/if}</b>
{$value|annotation:$annotation:$class|noescape}<br>
{/foreach}
{/foreach}
{if $class->internal}
<b>Documented at</b> <a href="{$class|manualUrl}" title="Go to PHP documentation">php.net</a>
{else}
<b>Located at</b> <a n:tag-if="$config->sourceCode" href="{$class|sourceUrl}" title="Go to source code">{$class->fileName|relativePath}</a>
{/if}
<br>
</div>
{var $ownMethods = $class->ownMethods}
{var $ownMagicMethods = $class->ownMagicMethods}
{define method}
<tr data-order="{$method->name}" id="{if $method->magic}m{/if}_{$method->name}" n:class="$method->deprecated ? deprecated">
{var $annotations = $method->annotations}
<td class="attributes"><code>
{if !$class->interface && $method->abstract}abstract{elseif $method->final}final{/if} {if $method->protected}protected{elseif $method->private}private{else}public{/if} {if $method->static}static{/if}
{ifset $annotations['return']}{$annotations['return'][0]|typeLinks:$method|noescape}{/ifset}
{if $method->returnsReference()}&{/if}
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#{if $method->magic}m{/if}_{$method->name}">#</a>
<code>{block|strip}
{if $class->internal}
<a href="{$method|manualUrl}" title="Go to PHP documentation">{$method->name}</a>(
{else}
<a n:tag-if="$config->sourceCode" href="{$method|sourceUrl}" title="Go to source code">{$method->name}</a>(
{/if}
{foreach $method->parameters as $parameter}
<span>{$parameter->typeHint|typeLinks:$method|noescape}
<var>{if $parameter->passedByReference}& {/if}${$parameter->name}</var>{if $parameter->defaultValueAvailable} = {$parameter->defaultValueDefinition|highlightPHP:$class|noescape}{elseif $parameter->unlimited},…{/if}</span>{sep}, {/sep}
{/foreach}
){/block}</code>
{if $config->template['options']['elementDetailsCollapsed']}
<div class="description short">
{$method|shortDescription:true|noescape}
</div>
{/if}
<div n:class="description, detailed, $config->template['options']['elementDetailsCollapsed'] ? hidden">
{$method|longDescription|noescape}
{if !$class->deprecated && $method->deprecated}
<h4>Deprecated</h4>
{ifset $annotations['deprecated']}
<div class="list">
{foreach $annotations['deprecated'] as $description}
{if $description}
{$description|annotation:'deprecated':$method|noescape}<br>
{/if}
{/foreach}
</div>
{/ifset}
{/if}
{if $method->parameters && isset($annotations['param'])}
<h4>Parameters</h4>
<div class="list"><dl>
{foreach $method->parameters as $parameter}
<dt><var>${$parameter->name}</var>{if $parameter->unlimited},…{/if}</dt>
<dd>{$parameter->description|description:$method|noescape}</dd>
{/foreach}
</dl></div>
{/if}
{if isset($annotations['return']) && 'void' !== $annotations['return'][0]}
<h4>Returns</h4>
<div class="list">
{foreach $annotations['return'] as $description}
{$description|annotation:'return':$method|noescape}{sep}<br>{/}
{/foreach}
</div>
{/if}
{ifset $annotations['throws']}
<h4>Throws</h4>
<div class="list">
{foreach $annotations['throws'] as $description}
{$description|annotation:'throws':$method|noescape}{sep}<br>{/}
{/foreach}
</div>
{/ifset}
{foreach $template->annotationSort($template->annotationFilter($annotations, array('deprecated', 'param', 'return', 'throws'))) as $annotation => $descriptions}
<h4>{$annotation|annotationBeautify}</h4>
<div class="list">
{foreach $descriptions as $description}
{if $description}
{$description|annotation:$annotation:$method|noescape}<br>
{/if}
{/foreach}
</div>
{/foreach}
{var $overriddenMethod = $method->overriddenMethod}
{if $overriddenMethod}
<h4>Overrides</h4>
<div class="list"><code><a n:tag-if="$template->getClass($overriddenMethod->declaringClassName)" href="{$overriddenMethod|methodUrl}">{$overriddenMethod->prettyName}</a></code></div>
{/if}
{var $implementedMethod = $method->implementedMethod}
{if $implementedMethod}
<h4>Implementation of</h4>
<div class="list"><code><a n:tag-if="$template->getClass($implementedMethod->declaringClassName)" href="{$implementedMethod|methodUrl}">{$implementedMethod->prettyName}</a></code></div>
{/if}
</div>
</div></td>
</tr>
{/define}
<table class="summary methods" id="methods" n:if="$ownMethods">
<caption>Methods summary</caption>
{foreach $ownMethods as $method}
{include method, method => $method}
{/foreach}
</table>
<table n:foreach="$class->inheritedMethods as $parentName => $methods" class="summary inherited">
<caption>Methods inherited from <a href="{$parentName|classUrl}#methods" n:tag-if="$template->getClass($parentName)">{$parentName}</a></caption>
<tr>
<td><code>
{foreach $methods as $method}
<a href="{$method|methodUrl}" n:tag-if="$template->getClass($parentName)"><span n:tag-if="$method->deprecated" class="deprecated">{$method->name}()</span></a>{sep}, {/sep}
{/foreach}
</code></td>
</tr>
</table>
<table n:foreach="$class->usedMethods as $traitName => $methods" class="summary used">
<caption>Methods used from <a href="{$traitName|classUrl}#methods" n:tag-if="$template->getClass($traitName)">{$traitName}</a></caption>
<tr>
<td><code>
{foreach $methods as $data}
<a href="{$data['method']|methodUrl:$data['method']->declaringTrait}" n:tag-if="$template->getClass($traitName)"><span n:tag-if="$data['method']->deprecated" class="deprecated">{$data['method']->name}()</span></a>{if $data['aliases']}(as {foreach $data['aliases'] as $alias}<span n:tag-if="$data['method']->deprecated" class="deprecated">{$alias->name}()</span>{sep}, {/sep}{/foreach}){/if}{sep}, {/sep}
{/foreach}
</code></td>
</tr>
</table>
<table class="summary methods" id="magicMethods" n:if="$ownMagicMethods">
<caption>Magic methods summary</caption>
{foreach $ownMagicMethods as $method}
{include method, method => $method}
{/foreach}
</table>
<table n:foreach="$class->inheritedMagicMethods as $parentName => $methods" class="summary inherited">
<caption>Magic methods inherited from <a href="{$parentName|classUrl}#methods" n:tag-if="$template->getClass($parentName)">{$parentName}</a></caption>
<tr>
<td><code>
{foreach $methods as $method}
<a href="{$method|methodUrl}" n:tag-if="$template->getClass($parentName)"><span n:tag-if="$method->deprecated" class="deprecated">{$method->name}()</span></a>{sep}, {/sep}
{/foreach}
</code></td>
</tr>
</table>
<table n:foreach="$class->usedMagicMethods as $traitName => $methods" class="summary used">
<caption>Magic methods used from <a href="{$traitName|classUrl}#methods" n:tag-if="$template->getClass($traitName)">{$traitName}</a></caption>
<tr>
<td><code>
{foreach $methods as $data}
<a href="{$data['method']|methodUrl:$data['method']->declaringTrait}" n:tag-if="$template->getClass($traitName)"><span n:tag-if="$data['method']->deprecated" class="deprecated">{$data['method']->originalName}()</span></a>{if $data['aliases']}(as {foreach $data['aliases'] as $alias}<span n:tag-if="$data['method']->deprecated" class="deprecated">{$alias->name}()</span>{sep}, {/sep}{/foreach}){/if}{sep}, {/sep}
{/foreach}
</code></td>
</tr>
</table>
{var $ownConstants = $class->ownConstants}
<table class="summary constants" id="constants" n:if="$ownConstants">
<caption>Constants summary</caption>
<tr n:foreach="$ownConstants as $constant" data-order="{$constant->name}" id="{$constant->name}">
{var $annotations = $constant->annotations}
<td class="attributes"><code>{$constant->typeHint|typeLinks:$constant|noescape}</code></td>
<td class="name">
<code>
{if $class->internal}
<a href="{$constant|manualUrl}" title="Go to PHP documentation"><b>{$constant->name}</b></a>
{else}
<a n:tag-if="$config->sourceCode" href="{$constant|sourceUrl}" title="Go to source code"><b>{$constant->name}</b></a>
{/if}
</code>
<div n:if="$config->template['options']['elementDetailsCollapsed']" class="description short">
{$constant|shortDescription:true|noescape}
</div>
<div n:class="description, detailed, $config->template['options']['elementDetailsCollapsed'] ? hidden">
{$constant|longDescription|noescape}
{foreach $template->annotationSort($template->annotationFilter($annotations, array('var'))) as $annotation => $descriptions}
<h4>{$annotation|annotationBeautify}</h4>
<div class="list">
{foreach $descriptions as $description}
{if $description}
{$description|annotation:$annotation:$constant|noescape}<br>
{/if}
{/foreach}
</div>
{/foreach}
</div>
</td>
<td class="value">
<div>
<a href="#{$constant->name}" class="anchor">#</a>
<code>{$constant->valueDefinition|highlightValue:$class|noescape}</code>
</div>
</td>
</tr>
</table>
<table n:foreach="$class->inheritedConstants as $parentName => $constants" class="summary inherited">
<caption>Constants inherited from <a href="{$parentName|classUrl}#constants" n:tag-if="$template->getClass($parentName)">{$parentName}</a></caption>
<tr>
<td><code>
{foreach $constants as $constant}
<a href="{$constant|constantUrl}" n:tag-if="$template->getClass($parentName)"><b><span n:tag-if="$constant->deprecated" class"deprecated">{$constant->name}</span></b></a>{sep}, {/sep}
{/foreach}
</code></td>
</tr>
</table>
{define property}
<tr data-order="{$property->name}" id="{if $property->magic}m{/if}${$property->name}">
<td class="attributes"><code>
{if $property->protected}protected{elseif $property->private}private{else}public{/if} {if $property->static}static{/if} {if $property->readOnly}read-only{elseif $property->writeOnly}write-only{/if}
{$property->typeHint|typeLinks:$property|noescape}
</code></td>
<td class="name">
{if $class->internal}
<a href="{$property|manualUrl}" title="Go to PHP documentation"><var>${$property->name}</var></a>
{else}
<a n:tag-if="$config->sourceCode" href="{$property|sourceUrl}" title="Go to source code"><var>${$property->name}</var></a>
{/if}
<div n:if="$config->template['options']['elementDetailsCollapsed']" class="description short">
{$property|shortDescription:true|noescape}
</div>
<div n:class="description, detailed, $config->template['options']['elementDetailsCollapsed'] ? hidden">
{$property|longDescription|noescape}
{foreach $template->annotationSort($template->annotationFilter($property->annotations, array('var'))) as $annotation => $descriptions}
<h4>{$annotation|annotationBeautify}</h4>
<div class="list">
{foreach $descriptions as $description}
{if $description}
{$description|annotation:$annotation:$property|noescape}<br>
{/if}
{/foreach}
</div>
{/foreach}
</div>
</td>
<td n:if="!$property->magic" class="value">
<div>
<a href="#{if $property->magic}m{/if}${$property->name}" class="anchor">#</a>
<code>{$property->defaultValueDefinition|highlightValue:$class|noescape}</code>
</div>
</td>
</tr>
{/define}
{var $ownProperties = $class->ownProperties}
{var $ownMagicProperties = $class->ownMagicProperties}
<table class="summary properties" id="properties" n:if="$ownProperties">
<caption>Properties summary</caption>
{foreach $ownProperties as $property}
{include property, property => $property}
{/foreach}
</table>
<table n:foreach="$class->inheritedProperties as $parentName => $properties" class="summary inherited">
<caption>Properties inherited from <a href="{$parentName|classUrl}#properties" n:tag-if="$template->getClass($parentName)">{$parentName}</a></caption>
<tr>
<td><code>
{foreach $properties as $property}
<a href="{$property|propertyUrl}" n:tag-if="$template->getClass($parentName)"><var><span n:tag-if="$property->deprecated" class="deprecated">${$property->name}</span></var></a>{sep}, {/sep}
{/foreach}
</code></td>
</tr>
</table>
<table n:foreach="$class->usedProperties as $traitName => $properties" class="summary used">
<caption>Properties used from <a href="{$traitName|classUrl}#properties" n:tag-if="$template->getClass($traitName)">{$traitName}</a></caption>
<tr>
<td><code>
{foreach $properties as $property}
<a href="{$property|propertyUrl:$property->declaringTrait}" n:tag-if="$template->getClass($traitName)"><var><span n:tag-if="$property->deprecated" class="deprecated">${$property->name}</span></var></a>{sep}, {/sep}
{/foreach}
</code></td>
</tr>
</table>
<table class="summary properties" id="magicProperties" n:if="$ownMagicProperties">
<caption>Magic properties summary</caption>
{foreach $ownMagicProperties as $property}
{include property, property => $property}
{/foreach}
</table>
<table n:foreach="$class->inheritedMagicProperties as $parentName => $properties" class="summary inherited">
<caption>Magic properties inherited from <a href="{$parentName|classUrl}#properties" n:tag-if="$template->getClass($parentName)">{$parentName}</a></caption>
<tr>
<td><code>
{foreach $properties as $property}
<a href="{$property|propertyUrl}" n:tag-if="$template->getClass($parentName)"><var><span n:tag-if="$property->deprecated" class="deprecated">${$property->name}</span></var></a>{sep}, {/sep}
{/foreach}
</code></td>
</tr>
</table>
<table n:foreach="$class->usedMagicProperties as $traitName => $properties" class="summary used">
<caption>Magic properties used from <a href="{$traitName|classUrl}#properties" n:tag-if="$template->getClass($traitName)">{$traitName}</a></caption>
<tr>
<td><code>
{foreach $properties as $property}
<a href="{$property|propertyUrl:$property->declaringTrait}" n:tag-if="$template->getClass($traitName)"><var><span n:tag-if="$property->deprecated" class="deprecated">${$property->name}</span></var></a>{sep}, {/sep}
{/foreach}
</code></td>
</tr>
</table>
{else}
<div class="invalid">
<p>
Documentation of this class could not be generated.
</p>
<p>
Class was originally declared in {$class->fileName|relativePath} and is invalid because of:
</p>
<ul>
<li n:foreach="$class->reasons as $reason">Class was redeclared in {$reason->getSender()->getFileName()|relativePath}.</li>
</ul>
</div>
{/if}
</div>
{/block}
|