FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
enqueue-dev/pkg/null/NullContext.php at master · practice-code/enqueue-dev · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
practice-code
/
enqueue-dev
Public
forked from
php-enqueue/enqueue-dev
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
enqueue-dev
/
pkg
/
null
/
NullContext.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
86 lines (73 loc) · 1.69 KB
Breadcrumbs
enqueue-dev
/
pkg
/
null
/
NullContext.php
Copy path
File metadata and controls
86 lines (73 loc) · 1.69 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
<?php
declare
(strict_types=
1
);
namespace
Enqueue
\
Null
;
use
Interop
\
Queue
\
Consumer
;
use
Interop
\
Queue
\
Context
;
use
Interop
\
Queue
\
Destination
;
use
Interop
\
Queue
\
Message
;
use
Interop
\
Queue
\
Producer
;
use
Interop
\
Queue
\
Queue
;
use
Interop
\
Queue
\
SubscriptionConsumer
;
use
Interop
\
Queue
\
Topic
;
class
NullContext
implements
Context
{
/**
* @return NullMessage
*/
public
function
createMessage
(
string
$
body
=
''
,
array
$
properties
= [],
array
$
headers
= []):
Message
{
$
message
=
new
NullMessage
();
$
message
->
setBody
(
$
body
);
$
message
->
setProperties
(
$
properties
);
$
message
->
setHeaders
(
$
headers
);
return
$
message
;
}
/**
* @return NullQueue
*/
public
function
createQueue
(
string
$
name
):
Queue
{
return
new
NullQueue
(
$
name
);
}
/**
* @return NullQueue
*/
public
function
createTemporaryQueue
():
Queue
{
return
$
this
->
createQueue
(
uniqid
(
''
,
true
));
}
/**
* @return NullTopic
*/
public
function
createTopic
(
string
$
name
):
Topic
{
return
new
NullTopic
(
$
name
);
}
/**
* @return NullConsumer
*/
public
function
createConsumer
(
Destination
$
destination
):
Consumer
{
return
new
NullConsumer
(
$
destination
);
}
/**
* @return NullProducer
*/
public
function
createProducer
():
Producer
{
return
new
NullProducer
();
}
/**
* @return NullSubscriptionConsumer
*/
public
function
createSubscriptionConsumer
():
SubscriptionConsumer
{
return
new
NullSubscriptionConsumer
();
}
public
function
purgeQueue
(
Queue
$
queue
):
void
{
}
public
function
close
():
void
{
}
}
Back
|
FazBrowse Home
|
New Git URL