Skip to content

Commit e232959

Browse files
authored
Merge pull request #2282 from michalsn/message_docs
Fix user guide for Message class
2 parents fd1e93b + 0a1da36 commit e232959

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

user_guide_src/source/incoming/message.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,14 @@ Class Reference
6666
The preceding ``HTTP_`` is removed from the string. So ``HTTP_ACCEPT_LANGUAGE`` becomes
6767
``Accept-Language``.
6868

69-
.. php:method:: headers()
69+
.. php:method:: getHeaders()
7070
7171
:returns: An array of all of the headers found.
7272
:rtype: array
7373

7474
Returns an array of all headers found or previously set.
7575

76-
.. php:method:: header([$name[, $filter = null]])
76+
.. php:method:: getHeader([$name[, $filter = null]])
7777
7878
:param string $name: The name of the header you want to retrieve the value of.
7979
:param int $filter: The type of filter to apply. A list of filters can be found `here <http://php.net/manual/en/filter.filters.php>`_.
@@ -84,14 +84,14 @@ Class Reference
8484
While the header is converted internally as described above, you can access the header with any type of case::
8585

8686
// These are all the same:
87-
$message->header('HOST');
88-
$message->header('Host');
89-
$message->header('host');
87+
$message->getHeader('HOST');
88+
$message->getHeader('Host');
89+
$message->getHeader('host');
9090

9191
If the header has multiple values, the values will return as an array of values. You can use the ``headerLine()``
9292
method to retrieve the values as a string::
9393

94-
echo $message->header('Accept-Language');
94+
echo $message->getHeader('Accept-Language');
9595

9696
// Outputs something like:
9797
[
@@ -101,7 +101,7 @@ Class Reference
101101

102102
You can filter the header by passing a filter value in as the second parameter::
103103

104-
$message->header('Document-URI', FILTER_SANITIZE_URL);
104+
$message->getHeader('Document-URI', FILTER_SANITIZE_URL);
105105

106106
.. php:method:: headerLine($name)
107107

0 commit comments

Comments
 (0)