-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathClasses.md.twig
229 lines (184 loc) · 9.5 KB
/
Classes.md.twig
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
`{{ node.path }}`
---
## {{ node.name }}
{% if node.description %}{{ node.description|raw }}{% endif %}
{% if method.deprecated %}`Deprecated !`
> *{{ method.tags.deprecated[0].description }}*
{% endif %}
{% if node.abstract %}`abstract`{% endif %}{% if node.final %}`final`{% endif %}
{% for tagName,tags in node.tags if tagName in ['example'] %}
{% if loop.first %}### Examples
{% endif %}
{% for tag in tags %}
#### {{ tag.description|escape }}
```
{{ tag.example|escape }}
```{% endfor %}
{% endfor %}
#### Package
{% if node.package.name is not empty and node.package.name != '\\' %}{{ node.package.parent.name != '\\' ? (node.package.parent.name ~ '\\' ~ node.package.name) : node.package.name }}{% endif %}
{% for tagName,tags in node.tags if tagName in ['link', 'see'] %}
{% if loop.first %}**See also**
{% endif %}
{% for tag in tags %}
- [{{ tag.description ?: tag.reference }}]({{ (tag.reference|route('url')) ?: tag.link }})
{% endfor %}
{% endfor %}
{% for tagName,tags in node.tags if tagName in ['uses'] %}
{% if loop.first %}**Uses**
{% endif %}
{% for tag in tags %}
- [{{ tag.description ?: tag.reference }}]({{ (tag.reference|route('url')) }})
{% endfor %}
{% endfor %}
{% for interface in node.interfaces %}
{% if loop.first %}### Implements
{% endif %}
[{{ interface.fullyQualifiedStructuralElementName }}]({{ interface|route('url') }})
{% endfor %}
{% for trait in node.usedTraits %}
{% if loop.first %}### Uses traits
{% endif %}
{% if trait.fullyQualifiedStructuralElementName %}[{{ trait.fullyQualifiedStructuralElementName ?: trait }}]({{ trait|route('url') }}){% endif %}
{% endfor %}
{% for tagName,tags in node.tags if tagName not in ['link', 'see', 'uses', 'abstract', 'example', 'method', 'property', 'property-read', 'property-write', 'package', 'subpackage'] %}
#### {{ tagName }}
{% for tag in tags %}
* {% if tag.version %}`{{ tag.version }}` {% endif %}{{ tag.description|raw }}
{% endfor %}{% endfor %}
### Overview
#### Public Properties
{% for property in node.inheritedProperties.merge(node.properties.merge(node.magicProperties))|sort_asc if property.visibility == 'public' %}[{{ property.name }}()](#{{ property.name }}){% if property.deprecated %} `deprecated`{% endif %} | {% else %}_No public properties found_{% endfor %}
#### Constants
{% for constant in node.inheritedConstants.merge(node.constants)|sort_asc %}[{{ constant.name }}()](#{{ constant.name }}){% if constant.deprecated %} `deprecated`{% else %} | {% endif %}{% else %}_No constants found_{% endfor %}
#### Public Methods
{% for method in node.inheritedMethods.merge(node.methods.merge(node.magicMethods))|sort_asc if method.visibility == 'public' %}[{{ method.name }}()](#{{ method.name }}){% if method.deprecated %} `deprecated`{% endif %} | {% else %}_No public methods found_{% endfor %}
{% set constants = node.inheritedConstants.merge(node.constants) %}
{% if constants|length > 0 %}### Constants
{% for constant in constants|sort_asc %}
#### {{ constant.name }}
`{{ constant.name }} = {{ constant.value|raw }}{% if not (constant.types is empty) %} : {{ constant.types|join('|') }}{% endif %}`
{% if (node.parent is not null and constant.parent.fullyQualifiedStructuralElementName != node.fullyQualifiedStructuralElementName) %}
* Inherited from [{{ constant.parent.fullyQualifiedStructuralElementName }}](class-{{ constant.parent.fullyQualifiedStructuralElementName|split('\\')|last }})
{% endif %}
{% if constant.deprecated %}`deprecated` {{ constant.tags.deprecated[0].description }}{% endif %}
{{ constant.summary }}
{% if constant.description %}> {{ constant.description|raw }}{% endif %}
{% if (node.parent is null) %}[{{ node.path }}](file-{{ node.path|split('/')|last|replace({'.php':".php.md", '.js':".js.md"}) }}){% endif %}
{% for tagName,tags in constant.tags if tagName in ['link', 'see'] %}
{% if loop.first %}**See also**
{% endif %}
{% for tag in tags %}
- [{{ tag.description ?: tag.reference }}]({{ tag.reference|route('url') ?: tag.link }})
{% endfor %}
{% endfor %}
{% for tagName,tags in constant.tags if tagName in ['uses'] %}
{% if loop.first %}**Uses**
{% endif %}
{% for tag in tags %}[{{ tag.description ?: tag.reference }}]({{ tag.reference|route('url') }}){% endfor %}
{% endfor %}
{% for tagName,tags in constant.tags if tagName not in ['link', 'see', 'var', 'deprecated', 'uses'] %}
{% if loop.first %}##### Tags
{% endif %}
{% for tag in tags %}
- **{{ tagName }}**: {% if tag.version %}`{{ tag.version }}` {% endif %}{{ tag.description|raw }}
{% endfor %}
{% endfor %}
{% endfor %}
{% endif %}
{% set properties = node.inheritedProperties.merge(node.properties.merge(node.magicProperties)) %}
{% if properties|length > 0 %}### Properties
{% for property in properties|sort_asc %}
#### {{ property.name }}
{{ property.summary }}
{% if property.description %}> {{ property.description|raw }}{% endif %}
`{{ property.visibility }}` `${{ property.name }}{% if property.types %} : {{ property.types|join('|') }}{% endif %}`
{% if (node.parent is not null and property.parent.fullyQualifiedStructuralElementName != node.fullyQualifiedStructuralElementName) %}
* Inherited from [{{ property.parent.fullyQualifiedStructuralElementName }}](class-{{ property.parent.fullyQualifiedStructuralElementName|split('\\')|last }})
{% endif %}
{% if property.deprecated %}`deprecated` {{ property.tags.deprecated[0].description }}{% endif %}
{% if property.types %}
{{ property.types }}{% if property.var.0.description %}: {{ property.var.0.description }}{% endif %}
{% endif %}
{% for tagName,tags in property.tags if tagName in ['link', 'see'] %}
{% if loop.first %}**See also**
{% endif %}
{% for tag in tags %}
- [{{ tag.description ?: tag.reference }}]({{ tag.reference|route('url') ?: tag.link }})
{% endfor %}
{% endfor %}
{% for tagName,tags in property.tags if tagName in ['uses'] %}
{% if loop.first %}**Uses**
{% endif %}
{% for tag in tags %}[{{ tag.description ?: tag.reference }}]({{ tag.reference|route('url') }}){% endfor %}
{% endfor %}
{% for tagName,tags in property.tags if tagName not in ['link', 'see', 'access', 'var', 'deprecated', 'uses'] %}
{% if loop.first %}##### Tags
{% endif %}
{% for tag in tags %}
- **{{ tagName }}**: {% if tag.version %}`{{ tag.version }}` {% endif %}{{ tag.description|raw }}
{% endfor %}
{% endfor %}
{% endfor %}
{% endif %}
{% set methods = node.inheritedMethods.merge(node.methods.merge(node.magicMethods)) %}
{% if methods|length > 0 %}### Methods
{% for method in methods|sort_asc %}
#### {{ method.name }}()
{{ method.summary }}
{% if method.description %}> {{ method.description|raw }}{% endif %}
{% if (method.parent is not null and method.parent.fullyQualifiedStructuralElementName != method.fullyQualifiedStructuralElementName) %}
* Inherited from [{{ method.parent.fullyQualifiedStructuralElementName }}](class-{{ method.parent.fullyQualifiedStructuralElementName|split('\\')|last }})
{% endif %}
`{{ method.visibility }}` `{{ method.name }}({% for argument in method.arguments %}{{ argument.types ? argument.types|join('|')~' ' }} {{ argument.isVariadic ? '...' }}${{ argument.name }}{{ argument.default ? ' = '~argument.default }}{% if not loop.last %}, {% endif %}{% endfor %}) {{ method.response.types ? ': '~method.response.types|join('|') }}`
{% if method.deprecated %}`deprecated`{% if method.tags.deprecated[0].version %} `>{{ method.tags.deprecated[0].version }}`{% endif %} {{ method.tags.deprecated[0].description }}{% endif %}
{% if method.static %}`static` {% endif %}{% if method.abstract %}`abstract` {% endif %}{% if method.final %}`final` {% endif %}
{% if (method.parent is null) %}[{{ method.path }}](file-{{ method.path|split('/')|last|replace({'.php':".php.md", '.js':".js.md"}) }}){% endif %}
{% for tagName,tags in method.tags if tagName in ['link', 'see'] %}
{% if loop.first %}**See also**
{% endif %}
{% for tag in tags %}
- [{{ tag.description ?: tag.reference }}]({{ tag.reference|route('url') ?: tag.link }})
{% endfor %}
{% endfor %}
{% for tagName,tags in method.tags if tagName in ['uses'] %}
{% if loop.first %}**Uses**
{% endif %}
{% for tag in tags %}[{{ tag.description ?: tag.reference }}]({{ tag.reference|route('url') }}){% endfor %}
{% endfor %}
{% for tagName,tags in method.tags if tagName not in ['link', 'see', 'abstract', 'example', 'param', 'return', 'access', 'deprecated', 'throws', 'throw', 'uses'] %}
{% if loop.first %}##### Tags
{% endif %}
{% for tag in tags %}
- **{{ tagName }}**: {% if tag.version %}`{{ tag.version }}` {% endif %}{{ tag.description|raw }}
{% endfor %}
{% endfor %}
{% endfor %}
{% endif %}
{% if method.arguments|length > 0 %}##### Parameters
{% for argument in method.arguments %}
`{{ argument.types|raw }}` `${{ argument.name }} {{ argument.isVariadic ? '(variadic)' }}` {{ argument.description|raw }}
{% endfor %}
{% endif %}
{% if method.tags.throws|length > 0 or method.tags.throw|length > 0 %}##### Throws
{% for exception in method.tags.throws %}
{{ exception.types|raw }}{% if exception.description %} – {{ exception.description|raw }}{% endif %}
{% endfor %}
{% for exception in method.tags.throw %}
{{ exception.types|raw }}{% if exception.description %} – {{ exception.description|raw }}{% endif %}
{% endfor %}
{% endif %}
{% if method.response and method.response.types|join() != 'void' %}##### Returns
{{ method.response.types|raw }}{% if exception.description %} – {{ method.response.description|raw }}{% endif %}
{% endif %}
{% for tagName,tags in method.tags if tagName in ['example'] %}
{% if loop.first %}##### Examples{% endif %}
{% for tag in tags %}
**{{ tag.description|escape }}**
```
{{ tag.example|escape }}
```
{% endfor %}
{% endfor %}
***
[\\](Home) » Classes » {{ node.name }}