File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,15 @@ $dot = dot();
6767$dot = dot($array);
6868```
6969
70+ It is possible use an alternative delimiter from the default dot (` . ` ) with the second constructor parameter. Using an underscore instead:
71+
72+ ``` php
73+ $dot = new \Adbar\Dot($array, '_');
74+
75+ // With the helper
76+ $dot = dot($array, '_');
77+ ```
78+
7079## Methods
7180
7281Dot has the following methods:
Original file line number Diff line number Diff line change 1111
1212if (! function_exists ('dot ' )) {
1313 /**
14- * Create a new Dot object with the given items
14+ * Create a new Dot object with the given items and optional delimiter
1515 *
16- * @param mixed $items
16+ * @param mixed $items
17+ * @param string $delimiter
1718 * @return \Adbar\Dot
1819 */
19- function dot ($ items )
20+ function dot ($ items, $ delimiter = ' . ' )
2021 {
21- return new Dot ($ items );
22+ return new Dot ($ items, $ delimiter );
2223 }
2324}
You can’t perform that action at this time.
0 commit comments