Skip to content

Commit 2d70dc1

Browse files
committed
Add delegate
1 parent 9167c95 commit 2d70dc1

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,20 @@ $this->delegate(array_shift($this->args));
146146

147147
Now can use `getArgument(0)` in sub method and ignore the first command name.
148148

149+
The is another way:
150+
151+
``` php
152+
$command = array_shift($this->args);
153+
154+
$this->delegate($command, ...$this->args);
155+
```
156+
157+
``` php
158+
protected function foo($first, $second = null)
159+
{
160+
}
161+
```
162+
149163
## API
150164

151165
### `getArgument($order[, $default = null])`

0 commit comments

Comments
 (0)