Skip to content

Commit 94561e6

Browse files
Adrian0350dkgroot
authored andcommitted
parent 5d73ddd
author Adrián Zúñiga <jaime.ziga@gmail.com> 1498157621 -0500 committer Diederik de Groot <dkgroot@talon.nl> 1556065511 +0200 Added DAHDIChannelEvent, SucessEvent and ReloadEvent Typo in assertTrue() in Test_Events PR provided by @Adrian0350 in (marcelog#138)
1 parent 5d73ddd commit 94561e6

File tree

5 files changed

+198
-2
lines changed

5 files changed

+198
-2
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ can still catch them. If you catch one of these, please report it!
129129
* ConfbridgeUnmute
130130
* CoreShowChannel
131131
* CoreShowChannelComplete
132+
* DAHDIChannel
132133
* DAHDIShowChannel
133134
* DAHDIShowChannelsComplete
134135
* FullyBooted
@@ -174,6 +175,7 @@ can still catch them. If you catch one of these, please report it!
174175
* QueueParams
175176
* QueueStatusComplete
176177
* QueueSummaryComplete
178+
* Reload
177179
* RegistrationsComplete
178180
* Registry
179181
* Rename
@@ -183,6 +185,7 @@ can still catch them. If you catch one of these, please report it!
183185
* RTPReceiverStat
184186
* RTPSenderStat
185187
* ShowDialPlanComplete
188+
* Success
186189
* Status
187190
* StatusComplete
188191
* Transfer
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
<?php
2+
/**
3+
* Event triggered for the end of the list when an action DAHDIChannel
4+
* is issued.
5+
*
6+
* PHP Version 5
7+
*
8+
* @category Pami
9+
* @package Message
10+
* @subpackage Event
11+
* @author Adrián Zúñiga <jaime.ziga@gmail.com>
12+
* @license http://marcelog.github.com/PAMI/ Apache License 2.0
13+
* @version SVN: $Id$
14+
* @link http://marcelog.github.com/PAMI/
15+
*
16+
* Copyright 2011 Marcelo Gornstein <marcelog@gmail.com>
17+
*
18+
* Licensed under the Apache License, Version 2.0 (the "License");
19+
* you may not use this file except in compliance with the License.
20+
* You may obtain a copy of the License at
21+
*
22+
* http://www.apache.org/licenses/LICENSE-2.0
23+
*
24+
* Unless required by applicable law or agreed to in writing, software
25+
* distributed under the License is distributed on an "AS IS" BASIS,
26+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
27+
* See the License for the specific language governing permissions and
28+
* limitations under the License.
29+
*
30+
*/
31+
namespace PAMI\Message\Event;
32+
33+
use PAMI\Message\Event\EventMessage;
34+
35+
class DAHDIChannelEvent extends EventMessage
36+
{
37+
/**
38+
* Returns key: 'Privilege'.
39+
*
40+
* @return string
41+
*/
42+
public function getPrivilege()
43+
{
44+
return $this->getKey('Privilege');
45+
}
46+
47+
/**
48+
* Returns key: 'DAHDIChannel'.
49+
*
50+
* @return string
51+
*/
52+
public function getDAHDIChannel()
53+
{
54+
return $this->getKey('DAHDIChannel');
55+
}
56+
57+
/**
58+
* Returns key: 'DAHDISpan'.
59+
*
60+
* @return string
61+
*/
62+
public function getDAHDISpan()
63+
{
64+
return $this->getKey('DAHDISpan');
65+
}
66+
67+
/**
68+
* Returns key: 'Channel'.
69+
*
70+
* @return string
71+
*/
72+
public function getChannel()
73+
{
74+
return $this->getKey('Channel');
75+
}
76+
77+
/**
78+
* Returns key: 'UniqueID'.
79+
*
80+
* @return string
81+
*/
82+
public function getUniqueID()
83+
{
84+
return $this->getKey('UniqueID');
85+
}
86+
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?php
2+
/**
3+
* Event triggered for the end of the list when an action Reload
4+
* is issued.
5+
*
6+
* PHP Version 5
7+
*
8+
* @category Pami
9+
* @package Message
10+
* @subpackage Event
11+
* @author Adrián Zúñiga <jaime.ziga@gmail.com>
12+
* @license http://marcelog.github.com/PAMI/ Apache License 2.0
13+
* @version SVN: $Id$
14+
* @link http://marcelog.github.com/PAMI/
15+
*
16+
* Copyright 2011 Marcelo Gornstein <marcelog@gmail.com>
17+
*
18+
* Licensed under the Apache License, Version 2.0 (the "License");
19+
* you may not use this file except in compliance with the License.
20+
* You may obtain a copy of the License at
21+
*
22+
* http://www.apache.org/licenses/LICENSE-2.0
23+
*
24+
* Unless required by applicable law or agreed to in writing, software
25+
* distributed under the License is distributed on an "AS IS" BASIS,
26+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
27+
* See the License for the specific language governing permissions and
28+
* limitations under the License.
29+
*
30+
*/
31+
namespace PAMI\Message\Event;
32+
33+
use PAMI\Message\Event\EventMessage;
34+
35+
class ReloadEvent extends EventMessage
36+
{
37+
/**
38+
* Returns key: 'RawContent'.
39+
*
40+
* @return string
41+
*/
42+
public function getRawContent()
43+
{
44+
return $this->getKey('RawContent');
45+
}
46+
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?php
2+
/**
3+
* Event triggered for the end of the list when an action Success
4+
* is issued.
5+
*
6+
* PHP Version 5
7+
*
8+
* @category Pami
9+
* @package Message
10+
* @subpackage Event
11+
* @author Adrián Zúñiga <jaime.ziga@gmail.com>
12+
* @license http://marcelog.github.com/PAMI/ Apache License 2.0
13+
* @version SVN: $Id$
14+
* @link http://marcelog.github.com/PAMI/
15+
*
16+
* Copyright 2011 Marcelo Gornstein <marcelog@gmail.com>
17+
*
18+
* Licensed under the Apache License, Version 2.0 (the "License");
19+
* you may not use this file except in compliance with the License.
20+
* You may obtain a copy of the License at
21+
*
22+
* http://www.apache.org/licenses/LICENSE-2.0
23+
*
24+
* Unless required by applicable law or agreed to in writing, software
25+
* distributed under the License is distributed on an "AS IS" BASIS,
26+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
27+
* See the License for the specific language governing permissions and
28+
* limitations under the License.
29+
*
30+
*/
31+
namespace PAMI\Message\Event;
32+
33+
use PAMI\Message\Event\EventMessage;
34+
35+
class SuccessEvent extends EventMessage
36+
{
37+
/**
38+
* Returns key: 'RawContent'.
39+
*
40+
* @return string
41+
*/
42+
public function getRawContent()
43+
{
44+
return $this->getKey('RawContent');
45+
}
46+
}

test/events/Test_Events.php

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ public function can_report_events()
7373
'DongleNewUSSDBase64', 'DongleNewUSSD', 'DongleUSSDStatus', 'DongleNewCUSD',
7474
'DongleStatus', 'DNDState', 'CEL', 'JabberEvent', 'Registry', 'UserEvent',
7575
'ParkedCall', 'UnParkedCall', 'Link',
76+
'DAHDIChannel', 'Reload', 'Success'
7677
'AGIExecStart',
7778
'AGIExecEnd',
7879
'AsyncAGIStart',
@@ -772,7 +773,7 @@ public function can_report_events()
772773
'ResultCode' => 'ResultCode'
773774
),
774775
'VarSet' => array(
775-
'Privilege' => 'Privilege',
776+
'Privilege' => 'Privilege',
776777
'Channel' => 'Channel',
777778
'Variable' => 'Variable',
778779
'Value' => 'Value',
@@ -783,6 +784,7 @@ public function can_report_events()
783784
'CallerIDName' => 'CallerIDName',
784785
'ConnectedLineNum' => 'ConnectedLineNum',
785786
'ConnectedLineName' => 'ConnectedLineName'
787+
'UniqueID' => 'UniqueID'
786788
),
787789
'Unlink' => array(
788790
'Privilege' => 'Privilege',
@@ -1566,6 +1568,19 @@ public function can_report_events()
15661568
'BridgeVideoSourceMode' => 'BridgeVideoSourceMode',
15671569
'BridgeVideoSource' => 'BridgeVideoSource',
15681570
),
1571+
'DAHDIChannel' => array(
1572+
'Privilege' => 'Privilege',
1573+
'DAHDIChannel' => 'DAHDIChannel',
1574+
'DAHDISpan' => 'DAHDISpan',
1575+
'Channel' => 'Channel',
1576+
'UniqueID' => 'UniqueID'
1577+
),
1578+
'Reload' => array(
1579+
'RawContent' => 'RawContent'
1580+
),
1581+
'Success' => array(
1582+
'RawContent' => 'RawContent'
1583+
)
15691584
);
15701585
$eventGetters = array(
15711586
'UserEvent' => array(
@@ -1693,7 +1708,7 @@ private function _testEvent($eventName, array $getters, array $values, array $tr
16931708

16941709
$this->assertTrue(
16951710
method_exists($event, $methodName),
1696-
sprintf('Method %s doesn\'t exixt in event %s', $methodName, get_class($event))
1711+
sprintf('Method %s doesn\'t exist in event %s', $methodName, get_class($event))
16971712
);
16981713

16991714
$this->assertEquals($event->$methodName(), $value, $eventName);

0 commit comments

Comments
 (0)