|
| 1 | +{% extends "layout/layout.twig" %} |
| 2 | +{% from "macros.twig" import render_classes, breadcrumbs, namespace_link, class_link, property_link, method_link, hint_link, source_link, method_source_link, deprecated, deprecations, todo, todos, class_category_name %} |
| 3 | +{% block title %}{{ class|raw }} | {{ parent() }}{% endblock %} |
| 4 | +{% block body_class 'class' %} |
| 5 | +{% block page_id 'class:' ~ (class.name|replace({'\\': '_'})) %} |
| 6 | + |
| 7 | +{% block below_menu %} |
| 8 | + {%- if class.namespace %} |
| 9 | +> {{- class_category_name(class.getCategoryId()) }} |
| 10 | + |
| 11 | +> {{- breadcrumbs(class.namespace) -}} |
| 12 | + |
| 13 | +({{- class.shortname|raw -}}) |
| 14 | + |
| 15 | + {%- endif %} |
| 16 | +{% endblock %} |
| 17 | + |
| 18 | +{% block page_content %} |
| 19 | + |
| 20 | +## {{ class.name|split('\\')|last|raw }}{{ deprecated(class) }} |
| 21 | + |
| 22 | +{{ block('class_signature') }} |
| 23 | + |
| 24 | +{{ deprecations(class) }} |
| 25 | + |
| 26 | + {%- if class.shortdesc or class.longdesc %} |
| 27 | + {%- if class.shortdesc -%} |
| 28 | + {{ class.shortdesc|desc(class) }} |
| 29 | + {%- endif %} |
| 30 | + {%- if class.longdesc -%} |
| 31 | + {{ class.longdesc|desc(class) }} |
| 32 | + {%- endif %} |
| 33 | + {%- if project.config('insert_todos') == true %} |
| 34 | + {{ todos(class) }} |
| 35 | + {%- endif %} |
| 36 | + {%- endif %} |
| 37 | + |
| 38 | + {% if traits %} |
| 39 | +{# #}### {% trans 'Traits' %} |
| 40 | + |
| 41 | +{# #}{{- render_classes(traits) }} |
| 42 | +{# #}{%- endif -%} |
| 43 | + |
| 44 | +{{ "\n" }} |
| 45 | +{# #}{%- if constants -%} |
| 46 | +{# #}### {% trans 'Constants' %} |
| 47 | + |
| 48 | +{# #}{{- block('constants') -}} |
| 49 | + {%- endif -%} |
| 50 | + |
| 51 | + {%- if properties %} |
| 52 | +{# #}### {% trans 'Properties' %} |
| 53 | + |
| 54 | +{# #}{{- block('properties') }} |
| 55 | + {%- endif -%} |
| 56 | + |
| 57 | + {%- if methods %} |
| 58 | +{# #}### {% trans 'Methods' %} |
| 59 | + |
| 60 | +{# #}{{- block('methods') }} |
| 61 | + |
| 62 | +{# #}### {% trans 'Details' %} |
| 63 | + |
| 64 | +{# #}{{- block('methods_details') }} |
| 65 | + {%- endif -%} |
| 66 | + |
| 67 | +{% endblock %} |
| 68 | + |
| 69 | +{% block class_signature -%} |
| 70 | + {% if not class.interface and class.abstract %}abstract {% endif %} |
| 71 | + {{- class_category_name(class.getCategoryId()) }} **{{ class.shortname|raw }}** |
| 72 | + {%- if class.parent %} |
| 73 | + extends {{ class_link(class.parent)|replace({'.html': '.md'})|raw }} |
| 74 | + {%- endif %} |
| 75 | + {%- if class.interfaces|length > 0 %} |
| 76 | + implements |
| 77 | + {% for interface in class.interfaces %} |
| 78 | + {{- class_link(interface)|replace({'.html': '.md'})|raw }} |
| 79 | + {%- if not loop.last %}, {% endif %} |
| 80 | + {%- endfor %} |
| 81 | + {%- endif %} |
| 82 | + {{- source_link(project, class) }} |
| 83 | +{% endblock %} |
| 84 | + |
| 85 | +{% block method_signature -%} |
| 86 | +{{ "\n" }} |
| 87 | +###{{ " " }} |
| 88 | +{# #}{%- if method.final -%}final{%- endif -%} |
| 89 | +{# #}{%- if method.abstract -%}abstract{%- endif -%} |
| 90 | +{# #}{%- if method.static -%}static{%- endif -%} |
| 91 | +{# #}{%- if method.protected -%}protected{%- endif -%} |
| 92 | +{# #}{%- if method.private -%}private{%- endif -%} |
| 93 | +{# #}{{- " " -}}{{- hint_link(method.hint) -}} |
| 94 | +{{- " " -}}**{{- method.name|raw -}}**{{ block('method_parameters_signature') }} |
| 95 | + |
| 96 | +{%- endblock %} |
| 97 | + |
| 98 | +{% block method_parameters_signature -%} |
| 99 | + {%- from "macros.twig" import method_parameters_signature -%} |
| 100 | + {{- method_parameters_signature(method) -}} |
| 101 | + {{- deprecated(method) -}} |
| 102 | +{%- endblock %} |
| 103 | + |
| 104 | +{% block parameters %} |
| 105 | + |
| 106 | +| | | | |
| 107 | +|---|---|---| |
| 108 | +{% for parameter in method.parameters %} |
| 109 | +|{%- if parameter.hint %}{{ hint_link(parameter.hint) }}{% endif -%} |
| 110 | +|{%- if parameter.variadic %}...{% endif %}${{ parameter.name|raw -}} |
| 111 | +|{{- parameter.shortdesc|desc(class) -}} |
| 112 | +{% endfor %} |
| 113 | +{% endblock %} |
| 114 | + |
| 115 | +{% block return %} |
| 116 | + |
| 117 | +| | | |
| 118 | +|---|---| |
| 119 | +|{{ hint_link(method.hint) }}|{{ method.hintDesc|desc(class) }} |
| 120 | +{% endblock %} |
| 121 | + |
| 122 | +{% block exceptions %} |
| 123 | + |
| 124 | +| | | |
| 125 | +|---|---| |
| 126 | +{% for exception in method.exceptions %} |
| 127 | +|{{ class_link(exception[0]) }}|{{ exception[1]|desc(class) }}| |
| 128 | +{% endfor %} |
| 129 | +{% endblock %} |
| 130 | + |
| 131 | +{% block see %} |
| 132 | +| | | |
| 133 | +|---|---| |
| 134 | +{% for see in method.see %} |
| 135 | +|{% if see[4] -%} |
| 136 | + [{{see[4]}}]({{see[4]}}) |
| 137 | +{%- elseif see[3] -%} |
| 138 | + {{- method_link(see[3], false, false) -}} |
| 139 | +{%- elseif see[2] -%} |
| 140 | + {{- class_link(see[2]) -}} |
| 141 | +{%- else -%} |
| 142 | + {{- see[0]|raw -}} |
| 143 | +{%- endif -%} |
| 144 | +|{{ see[1]|raw }} |
| 145 | +{% endfor %} |
| 146 | +{% endblock %} |
| 147 | + |
| 148 | +{% block constants %} |
| 149 | + |
| 150 | +| | | |
| 151 | +|---|---| |
| 152 | +{% for constant in constants %} |
| 153 | +{# #}|{{ constant.name|raw }}|{{ constant.shortdesc|desc(class) }}{{ constant.longdesc|desc(class) }}| |
| 154 | +{% endfor %} |
| 155 | + |
| 156 | +{% endblock %} |
| 157 | + |
| 158 | +{% block properties %} |
| 159 | + |
| 160 | +| | | | | |
| 161 | +|---|---|---|---| |
| 162 | +{# #}{% for property in properties %} |
| 163 | +|<a name="property_{{ property.name|raw }}"></a> |
| 164 | + {%- if property.static -%}static{%- endif -%} |
| 165 | + {%- if property.protected -%}protected{%- endif -%} |
| 166 | + {%- if property.private -%}private{%- endif -%} |
| 167 | + {{ " " }}{{- hint_link(property.hint) -}} |
| 168 | + |${{- property.name|raw -}} |
| 169 | + |{{- property.shortdesc|desc(class) -}} |
| 170 | + |{%- if property.class is not same as(class) -%} |
| 171 | + <small>{{ 'from %s'|trans|format(property_link(property, false, true))|replace({'.html': '.md'})|raw }}</small> |
| 172 | + {%- endif -%}| |
| 173 | +{# #}{%- endfor %} |
| 174 | +{% endblock %} |
| 175 | + |
| 176 | +{% block methods %} |
| 177 | + |
| 178 | +| | | | | |
| 179 | +|---|---|---|---| |
| 180 | +{% for method in methods %} |
| 181 | +|{% if method.static %}static {% endif %}{{ hint_link(method.hint) -}} |
| 182 | +|<a name="#method_{{ method.name|raw }}"></a>{{ method.name|raw }}{{ block('method_parameters_signature') -}} |
| 183 | +|{% if not method.shortdesc %} |
| 184 | + {%- trans 'No description' -%} |
| 185 | +{% else %} |
| 186 | + {{- method.shortdesc|desc(class)|replace({"\n": ". "}) }} |
| 187 | +{%- endif %} |
| 188 | +|{%- if method.class is not same as(class) -%} |
| 189 | +{{ 'from %s'|trans|format(method_link(method, false, true))|replace({'.html': '.md'})|raw }} |
| 190 | +{%- endif -%}| |
| 191 | +{% endfor %} |
| 192 | +{% endblock %} |
| 193 | + |
| 194 | +{% block methods_details %} |
| 195 | +{% for method in methods %} |
| 196 | +{{- block('method') -}} |
| 197 | +{%- endfor %} |
| 198 | +{% endblock %} |
| 199 | + |
| 200 | +{% block method %} |
| 201 | +<a name id="method_{{ method.name|raw }}"></a> |
| 202 | +{{- block('method_signature') -}} |
| 203 | +{% if method.class is not same as(class) %}{{ 'in %s'|trans|format(method_link(method, false, true))|replace({'.html': '.md'})|raw }}{% endif %} |
| 204 | +{{ "\n" }} |
| 205 | +{{ method_source_link(method) -}} |
| 206 | +{{- deprecations(method) -}} |
| 207 | +{{ "\n" }} |
| 208 | +{% if method.shortdesc or method.longdesc %} |
| 209 | + {%- if not method.shortdesc and not method.longdesc -%} |
| 210 | + {%- trans 'No description' -%} |
| 211 | + {%- else -%} |
| 212 | + {%- if method.shortdesc -%} |
| 213 | + {{- method.shortdesc|desc(class) -}} |
| 214 | + {%- endif %} |
| 215 | + {% if method.longdesc -%} |
| 216 | + {{- method.longdesc|desc(class) -}} |
| 217 | + {%- endif -%} |
| 218 | + {%- endif -%} |
| 219 | + {%- if project.config('insert_todos') == true -%} |
| 220 | + {{- todos(method) -}} |
| 221 | + {%- endif -%} |
| 222 | +{%- endif -%} |
| 223 | + |
| 224 | +{%- if method.parameters -%} |
| 225 | +{{ "\n" }} |
| 226 | +{# #}#### {% trans 'Parameters' %} |
| 227 | + |
| 228 | +{# #}{{- block('parameters') -}} |
| 229 | +{%- endif %} |
| 230 | + |
| 231 | +{%- if method.hintDesc or method.hint -%} |
| 232 | +{{ "\n" }} |
| 233 | +{# #}#### {% trans 'Return Value' %} |
| 234 | + |
| 235 | +{# #}{{- block('return') -}} |
| 236 | +{%- endif %} |
| 237 | + |
| 238 | +{%- if method.exceptions -%} |
| 239 | +{{ "\n" }} |
| 240 | +{# #}#### {% trans 'Exceptions' %} |
| 241 | + |
| 242 | +{# #}{{- block('exceptions') -}} |
| 243 | +{%- endif %} |
| 244 | + |
| 245 | +{%- if method.tags('see') -%} |
| 246 | +{{ "\n" }} |
| 247 | +{# #}#### {% trans 'See also' %} |
| 248 | + |
| 249 | +{# #}{{- block('see') -}} |
| 250 | +{%- endif %} |
| 251 | + |
| 252 | +{% endblock %} |
0 commit comments