Skip to content

Commit 7de9ac5

Browse files
minworkgitbook-bot
authored andcommitted
GitBook: [master] 5 pages modified
1 parent ce8cb3c commit 7de9ac5

File tree

5 files changed

+20
-2
lines changed

5 files changed

+20
-2
lines changed

common-methods/get-getnestedelement.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ get($array, $keys, $default = null) -> getNestedElement($array, $keys, $default)
1616

1717
Get nested array element using specified keys or return `$default` value if it does not exists.
1818

19+
{% hint style="info" %}
20+
`$keys` argument is parsed using [getKeysArray ](getkeysarray.md)method
21+
{% endhint %}
22+
1923
#### Examples
2024

2125
```php

common-methods/getkeysarray.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ Arr::getKeysArray(mixed $keys): array
1010

1111
Transform variable into standardised array of keys.
1212

13+
This method filters out any values that cannot be used as array key leaving only not empty strings and integers as seen in the example below.
14+
1315
{% hint style="info" %}
1416
All `$keys` arguments in other methods are normalized using this method
1517
{% endhint %}

common-methods/has.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@
33
#### Definition
44

55
```php
6-
Arr::has(array $array, $keys): bool
6+
Arr::has(array $array, mixed $keys): bool
77
```
88

99
#### Description
1010

1111
Check if specified \(nested\) key\(s\) exists in array
1212

13+
{% hint style="info" %}
14+
`$keys` argument is parsed using [getKeysArray ](getkeysarray.md)method
15+
{% endhint %}
16+
1317
#### Examples
1418

1519
```php

common-methods/remove.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ Arr::remove(array $array, $keys): array
88

99
#### Description
1010

11-
Remove element inside array at path specified by keys
11+
Remove element inside array at path specified by keys.
12+
13+
{% hint style="info" %}
14+
`$keys` argument is parsed using [getKeysArray ](getkeysarray.md)method
15+
{% endhint %}
1216

1317
#### Examples
1418

common-methods/set-setnestedelement.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ set(array $array, $keys, $value) -> setNestedElement(array $array, $keys, $value
1616

1717
Set array element specified by keys to the desired value \(create missing keys if necessary\).
1818

19+
{% hint style="info" %}
20+
`$keys` argument is parsed using [getKeysArray ](getkeysarray.md)method
21+
{% endhint %}
22+
1923
#### Examples
2024

2125
```php

0 commit comments

Comments
 (0)