@@ -19,32 +19,35 @@ public function __construct($to, $from = null)
1919
2020 public function onAnswer ($ tag , $ attribs = [], $ isSequential = false )
2121 {
22+ $ newTag = $ this ->append ($ tag , $ attribs );
2223 if ($ isSequential ){
23- $ this ->attributes ['onanswer ' ] = array_merge ($ this ->attributes ['onanswer ' ], array ($ this ->append ($ tag , $ attribs )) );
24- return $ this ->attributes ;
24+ $ this ->attributes ['onanswer ' ] = array_merge ($ this ->attributes ['onanswer ' ], array ($ newTag ) );
2525 }else {
26- return $ this ->setAttribute ('onanswer ' , array ($ this -> append ( $ tag , $ attribs ) ), true );
26+ $ this ->setAttribute ('onanswer ' , array ($ newTag ), true );
2727 }
28+ return $ newTag ;
2829 }
2930
3031 public function onNoAnswer ($ tag , $ attribs = [], $ isSequential = false )
3132 {
33+ $ newTag = $ this ->append ($ tag , $ attribs );
3234 if ($ isSequential ){
33- $ this ->attributes ['onnoanswer ' ] = array_merge ($ this ->attributes ['onnoanswer ' ], array ($ this ->append ($ tag , $ attribs )) );
34- return $ this ->attributes ;
35+ $ this ->attributes ['onnoanswer ' ] = array_merge ($ this ->attributes ['onnoanswer ' ], array ($ newTag ) );
3536 }else {
36- return $ this ->setAttribute ('onnoanswer ' , array ($ this -> append ( $ tag , $ attribs ) ), true );
37+ $ this ->setAttribute ('onnoanswer ' , array ($ newTag ), true );
3738 }
39+ return $ newTag ;
3840 }
3941
4042 public function noAnswer ($ tag , $ attribs = [], $ isSequential = false )
4143 {
44+ $ newTag = $ this ->append ($ tag , $ attribs );
4245 if ($ isSequential ){
43- $ this ->attributes ['onnoanswer ' ] = array_merge ($ this ->attributes ['onnoanswer ' ], array ($ this ->append ($ tag , $ attribs )) );
44- return $ this ->attributes ;
46+ $ this ->attributes ['onnoanswer ' ] = array_merge ($ this ->attributes ['onnoanswer ' ], array ($ newTag ) );
4547 }else {
46- return $ this ->setAttribute ('onnoanswer ' , array ($ this -> append ( $ tag , $ attribs ) ), true );
48+ $ this ->setAttribute ('onnoanswer ' , array ($ newTag ), true );
4749 }
50+ return $ newTag ;
4851 }
4952
5053 public function getDefaultAttributes ()
0 commit comments