File tree 2 files changed +9
-6
lines changed
2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -83,12 +83,12 @@ try {
83
83
84
84
``` php
85
85
86
- $speakSentence = new BandwidthLib\Voice\Bxml\SpeakSentence("Hello!");
87
- $speakSentence ->voice("susan");
88
- $speakSentence ->locale("en_US");
89
- $speakSentence ->gender("female");
90
- $response = new BandwidthLib\Voice\Bxml\Response();
91
- $response ->addVerb($speakSentence);
86
+ $speakSentence = BandwidthLib\Voice\Bxml\SpeakSentence::make ("Hello!")
87
+ ->voice("susan")
88
+ ->locale("en_US")
89
+ ->gender("female");
90
+ $response = BandwidthLib\Voice\Bxml\Response::make()
91
+ ->addVerb($speakSentence);
92
92
echo $response->toBxml();
93
93
```
94
94
Original file line number Diff line number Diff line change @@ -22,4 +22,7 @@ abstract class Verb {
22
22
*/
23
23
abstract protected function toBxml (DOMDocument $ doc ): DOMElement ;
24
24
25
+ public static function make (): static {
26
+ return new static (...func_get_args ());
27
+ }
25
28
}
You can’t perform that action at this time.
0 commit comments