Skip to content
Snippets Groups Projects
method.md.twig 1.88 KiB
Newer Older
#### {{ node.FullyQualifiedStructuralElementName|trim('\\') }}::{{ method.name }}

```php
{{ method.getSignature(80)|replace({'<mixed,': '<'})|raw }}
```

{% if method.summary is not empty %}
##### {{ method.summary|raw }}
{% endif %}

{{ method.description|raw }}

{% if method.deprecated %}**Warning:** this method is **deprecated**. This means that this method will likely be removed in a future version.
<br />{% endif %}
{% if method.static %}**Static:** this method is **static**.
<br />{% endif %}
**Visibility:** this method is **{{ method.visibility }}**.
<br />
{%  if method.name != '__construct' and method.response %} **Returns**: this method returns **{{ method.response.types[0] == 'self' ? node.name : method.response.types|join('|') }}**
<br />{% endif %}
{% if method.response.description %}**Response description:** {{ method.response.description|raw }}
<br />{% endif %}
{% if method.tags.throws is not empty %}**Throws:** this method may throw {% for throws in method.tags.throws %}
{{ not loop.first ? ' or ' }}**{{ throws.types|join('** or **')|raw }}**{% endfor %}
<br />{% endif %}


{% if method.arguments is not empty %}
##### Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
{% for argument in method.arguments %}
| `{{ argument.name }}` | {% if argument.types is not empty %}**{{ argument.types ? argument.types|join(' &#124; ')|replace({'<mixed,': '&lt;', (node.namespace.FullyQualifiedStructuralElementName~'\\'): ''})|raw }}**{% endif %}  | {{ argument.description|replace({'|': '&#124;'})|raw }} |
{% endfor %}

{% endif %}


{% if method.tags.see is not empty or method.tags.link is not empty %}
**See Also:**

{% for see in method.tags.see %}
* {{ see.reference }} {% if see.description %}- {{ see.description|raw }}{% endif %}
{% endfor %}
{% for link in method.tags.link %}
* [{{ link.description ?: link.link }}]({{ link.link }})
{% endfor %}

{% endif %}