-
Notifications
You must be signed in to change notification settings - Fork 1
/
Interfaces.md.twig
169 lines (134 loc) · 7.01 KB
/
Interfaces.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
`{{ node.path }}`
---
## {{ node.summary }}
{% if node.description %}{{ node.description|raw }}{% endif %}
{% if method.deprecated %}`Deprecated !`
> *{{ method.tags.deprecated[0].description }}*
{% 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 is not empty and node.package != '\\' %}{{ node.subpackage ? (node.package ~ '\\' ~ node.subpackage) : node.package }}{% endif %}
{% for parent in node.parent %}
{% if loop.first %}#### Parents
{% endif %}
- [{{ parent.fullyQualifiedStructuralElementName }}]({{ parent|route('url') }})
{% endfor %}
{% 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 Name not in ['link', 'see', 'abstract', 'method', 'package', 'subpackage'] %}
#### {{ tagName }}
{% for tag in tags %}
* {% if tag.version %}`{{ tag.version }}` {% endif %}{{ tag.description|raw }}
{% endfor %}{% endfor %}
### Overview
#### 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)|sort_asc if method.visibility == 'public' %}[{{ method.name }}()](#{{ method.name }}){% if method.deprecated %} `deprecated`{% endif %} | {% else %}_No public methods found_{% endfor %}
#### Proteced Methods
{% for method in node.inheritedMethods.merge(node.methods)|sort_asc if method.visibility == 'protected' %}[{{ method.name }}()](#{{ method.name }}){% if method.deprecated %} `deprecated`{% endif %} | {% else %}_No protected methods found_{% endfor %}
{% if node.constants|length > 0 %}### Constants
{% for constant in node.inheritedConstants.merge(node.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|replace({'\\':""}) }})
{% 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 %}
{% if node.inheritedMethods.merge(node.methods)|length > 0 %}### Methods
{% for method in node.inheritedMethods.merge(node.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|replace({'\\':""}) }})
{% 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) » Interfaces » {{ node.name }}