|
| 1 | +## {{ class.name }} |
| 2 | + |
| 3 | +{{ class.summary|raw }} |
| 4 | + |
| 5 | +{{ class.description|raw }} |
| 6 | + |
| 7 | +* Full name: {{ class.FullyQualifiedStructuralElementName }} |
| 8 | +{% if class.parent %}* Parent class: {{ class.parent.FullyQualifiedStructuralElementName }} |
| 9 | +{% endif %} |
| 10 | +{% if class.interfaces is not empty %}* This class implements: {{ class.interfaces|join(', ')|raw }} |
| 11 | +{% endif %} |
| 12 | +{% if class.deprecated %}* **Warning:** this class is **deprecated**. This means that this class will likely be removed in a future version. |
| 13 | +{% endif %} |
| 14 | + |
| 15 | +{% if class.tags.see is not empty or class.tags.link is not empty %} |
| 16 | +**See Also:** |
| 17 | + |
| 18 | +{% for see in class.tags.see %} |
| 19 | +* {{ see.reference }} {% if see.description %}- {{ see.description|raw }}{% endif %} |
| 20 | +{% endfor %} |
| 21 | +{% for link in class.tags.link %} |
| 22 | +* {{ link.link }} {% if link.description and link.description != link.link %}- {{ link.description|raw }}{% endif %} |
| 23 | +{% endfor %} |
| 24 | + |
| 25 | +{% endif %}{# class.tags.see || class.tags.link #} |
| 26 | + |
| 27 | +{% set specialMethods = class.magicMethods ? class.inheritedMethods.merge(class.magicMethods) : class.inheritedMethods %} |
| 28 | +{% for method in class.methods.merge(specialMethods) %} |
| 29 | +{% if method.visibility == 'public' %} |
| 30 | + |
| 31 | +### {{ method.name }} |
| 32 | + |
| 33 | +{{ method.summary|raw }} |
| 34 | + |
| 35 | +{# Method signature #} |
| 36 | +```php |
| 37 | +{{ class.name }}::{{ method.name }}( {% for argument in method.arguments %} |
| 38 | +{{- argument.types ? argument.types|join('|')~' ' }} |
| 39 | +{{- argument.byReference ? '&' }} |
| 40 | +{{- argument.name }}{{ argument.default ? ' = '~argument.default }} |
| 41 | +{%- if not loop.last %}, {% endif %} |
| 42 | +{%- endfor %} ) |
| 43 | +{{- method.response.types ? ': '~method.response.types|join('|') }} |
| 44 | +``` |
| 45 | + |
| 46 | +{{ method.description|raw }} |
| 47 | + |
| 48 | +{% if method.static %}* This method is **static**.{% endif %} |
| 49 | +{% if method.deprecated %}* **Warning:** this method is **deprecated**. This means that this method will likely be removed in a future version. |
| 50 | +{% endif %} |
| 51 | + |
| 52 | +{% if method.arguments is not empty %} |
| 53 | +**Parameters:** |
| 54 | + |
| 55 | +| Parameter | Type | Description | |
| 56 | +|-----------|------|-------------| |
| 57 | +{% for argument in method.arguments %} |
| 58 | +| `{{ argument.name }}` | **{{ argument.types ? argument.types|join('|')|raw }}** | {{ argument.description|replace({'|': '|'})|raw }} | |
| 59 | +{% endfor %} |
| 60 | + |
| 61 | +{% endif %}{# method.arguments is not empty #} |
| 62 | + |
| 63 | +{% if method.response.description %} |
| 64 | +**Return Value:** |
| 65 | + |
| 66 | +{{ method.response.description|raw }} |
| 67 | + |
| 68 | +{% endif %} |
| 69 | + |
| 70 | +{% if method.tags.see is not empty or method.tags.link is not empty %} |
| 71 | +**See Also:** |
| 72 | + |
| 73 | +{% for see in method.tags.see %} |
| 74 | +* {{ see.reference }} {% if see.description %}- {{ see.description|raw }}{% endif %} |
| 75 | +{% endfor %} |
| 76 | +{% for link in method.tags.link %} |
| 77 | +* {{ link.link }} {% if link.description and link.description != link.link %}- {{ link.description|raw }}{% endif %} |
| 78 | +{% endfor %} |
| 79 | + |
| 80 | +{% endif %}{# method.tags.see || method.tags.link #} |
| 81 | + |
| 82 | +--- |
| 83 | + |
| 84 | +{% endif %}{# method.visibility == 'public' #} |
| 85 | +{% endfor %}{# method in class.methods #} |
0 commit comments