@@ -17,19 +17,37 @@ public function __construct($to, $from = null)
1717 parent ::__construct ("Dial " , $ attrib );
1818 }
1919
20- public function onAnswer ($ tag , $ attribs = [])
20+ public function onAnswer ($ tag , $ attribs = [], $ isSequential = false )
2121 {
22- return $ this ->setAttribute ('onanswer ' , $ this ->append ($ tag , $ attribs ), true );
22+ $ newTag = $ this ->append ($ tag , $ attribs );
23+ if ($ isSequential ){
24+ $ this ->attributes ['onanswer ' ] = array_merge ($ this ->attributes ['onanswer ' ], array ($ newTag ) );
25+ }else {
26+ $ this ->setAttribute ('onanswer ' , array ($ newTag ), true );
27+ }
28+ return $ newTag ;
2329 }
2430
25- public function onNoAnswer ($ tag , $ attribs = [])
31+ public function onNoAnswer ($ tag , $ attribs = [], $ isSequential = false )
2632 {
27- return $ this ->setAttribute ('onnoanswer ' , $ this ->append ($ tag , $ attribs ), true );
33+ $ newTag = $ this ->append ($ tag , $ attribs );
34+ if ($ isSequential ){
35+ $ this ->attributes ['onnoanswer ' ] = array_merge ($ this ->attributes ['onnoanswer ' ], array ($ newTag ) );
36+ }else {
37+ $ this ->setAttribute ('onnoanswer ' , array ($ newTag ), true );
38+ }
39+ return $ newTag ;
2840 }
2941
30- public function noAnswer ($ tag , $ attribs = [])
42+ public function noAnswer ($ tag , $ attribs = [], $ isSequential = false )
3143 {
32- return $ this ->setAttribute ('onnoanswer ' , $ this ->append ($ tag , $ attribs ), true );
44+ $ newTag = $ this ->append ($ tag , $ attribs );
45+ if ($ isSequential ){
46+ $ this ->attributes ['onnoanswer ' ] = array_merge ($ this ->attributes ['onnoanswer ' ], array ($ newTag ) );
47+ }else {
48+ $ this ->setAttribute ('onnoanswer ' , array ($ newTag ), true );
49+ }
50+ return $ newTag ;
3351 }
3452
3553 public function getDefaultAttributes ()
0 commit comments