From 13cdab1ea90e7197b37b4b965e85e35696f532f4 Mon Sep 17 00:00:00 2001 From: Felix Kempf Date: Mon, 6 Mar 2017 23:31:53 +0100 Subject: [PATCH] Update hash.rst Added the matchToken `{*}` to several places in this article where the usage of `{n}` and `{s}` is presented as possible. --- en/core-libraries/hash.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/en/core-libraries/hash.rst b/en/core-libraries/hash.rst index d47f3335de..af708d349d 100644 --- a/en/core-libraries/hash.rst +++ b/en/core-libraries/hash.rst @@ -37,6 +37,8 @@ Expression Types | | string value including numeric string | | | values. | +--------------------------------+--------------------------------------------+ +| ``{*}`` | Matches any value. | ++--------------------------------+--------------------------------------------+ | ``Foo`` | Matches keys with the exact same value. | +--------------------------------+--------------------------------------------+ @@ -74,7 +76,7 @@ Attribute Matching Types .. php:staticmethod:: get(array|\ArrayAccess $data, $path, $default = null) ``get()`` is a simplified version of ``extract()``, it only supports direct - path expressions. Paths with ``{n}``, ``{s}`` or matchers are not + path expressions. Paths with ``{n}``, ``{s}``, ``{*}`` or matchers are not supported. Use ``get()`` when you want exactly one value out of an array. If a matching path is not found the default value will be returned. @@ -115,7 +117,7 @@ Attribute Matching Types ] ] - You can use paths using ``{n}`` and ``{s}`` to insert data into multiple +   You can use paths using ``{n}``, ``{s}`` and ``{*}`` to insert data into multiple points:: $users = Hash::insert($users, '{n}.new', 'value'); @@ -158,7 +160,7 @@ Attribute Matching Types ] */ - Using ``{n}`` and ``{s}`` will allow you to remove multiple values at once. + Using ``{n}``, ``{s}`` and ``{*}`` will allow you to remove multiple values at once. You can also use attribute matchers with ``remove()``:: $data = [