-
Notifications
You must be signed in to change notification settings - Fork 46
/
FrameFactory.php
91 lines (78 loc) · 1.65 KB
/
FrameFactory.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?php
namespace YiiNodeSocket\Frames;
require_once 'AFrame.php';
require_once 'Event.php';
require_once 'Authentication.php';
require_once 'LogoutFrame.php';
require_once 'UserEvent.php';
require_once 'ChannelEvent.php';
require_once 'Multiple.php';
require_once 'PublicData.php';
require_once 'Invoke.php';
require_once 'JQuery.php';
class FrameFactory implements IFrameFactory {
/**
* @var \NodeSocket
*/
protected $_nodeSocket;
/**
* @param \NodeSocket $transport
*/
public function __construct(\YiiNodeSocket\NodeSocket $transport) {
$this->_nodeSocket = $transport;
}
/**
* @return Event
*/
public function createEventFrame() {
return new Event($this->_nodeSocket);
}
/**
* @return ChannelEvent
*/
public function createChannelEventFrame() {
return new ChannelEvent($this->_nodeSocket);
}
/**
* @return Multiple
*/
public function createMultipleFrame() {
return new Multiple($this->_nodeSocket);
}
/**
* @return PublicData
*/
public function createPublicDataFrame() {
return new PublicData($this->_nodeSocket);
}
/**
* @return Invoke
*/
public function createInvokeFrame() {
return new Invoke($this->_nodeSocket);
}
/**
* @return JQuery
*/
public function createJQueryFrame() {
return new JQuery($this->_nodeSocket);
}
/**
* @return Authentication
*/
public function createAuthenticationFrame() {
return new Authentication($this->_nodeSocket);
}
/**
* @return Authentication
*/
public function createLogoutFrame() {
return new LogoutFrame($this->_nodeSocket);
}
/**
* @return UserEvent
*/
public function createUserEventFrame() {
return new UserEvent($this->_nodeSocket);
}
}