Skip to content

Commit f16daf0

Browse files
authored
Update README.md
Fix `php fatal error call to unknown function addCustomMapping` when using example code from section "Custom Control Mapping", by changing `addCustomMapping` to `addCustomControlMapping`.
1 parent dcd1df7 commit f16daf0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,7 @@ $menu = (new CliMenuBuilder)
906906
->addItem('Item 1')
907907
->build();
908908

909-
$menu->addCustomMapping("x", $exit);
909+
$menu->addCustomControlMapping("x", $exit);
910910

911911
$menu->open();
912912
```
@@ -928,7 +928,7 @@ $menu = (new CliMenuBuilder)
928928
->build();
929929

930930
// Now, pressing Uppercase C (it's case sensitive) will call $myCallback
931-
$menu->addCustomMapping('C', $myCallback);
931+
$menu->addCustomControlMapping('C', $myCallback);
932932

933933
$menu->open();
934934
```

0 commit comments

Comments
 (0)