mirror of
https://github.com/cachethq/cachet.git
synced 2026-03-05 12:07:02 +00:00
Compare commits
596 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f79fadab80 | ||
|
|
e3dc7594e5 | ||
|
|
200771cdab | ||
|
|
56760c7445 | ||
|
|
65ebfde315 | ||
|
|
4f7c50f7f4 | ||
|
|
de232ab2b5 | ||
|
|
067018cf47 | ||
|
|
97e5fa07fa | ||
|
|
dec48a92f3 | ||
|
|
0672fe046e | ||
|
|
b78009bee4 | ||
|
|
5907f54201 | ||
|
|
555865d761 | ||
|
|
c0561ad8c0 | ||
|
|
ef8049c21d | ||
|
|
cf80bf31f3 | ||
|
|
cf900e1390 | ||
|
|
df31b4d20e | ||
|
|
f383d50f16 | ||
|
|
369073e636 | ||
|
|
eb6a638a59 | ||
|
|
9a743ab425 | ||
|
|
36d89a9ad8 | ||
|
|
7dfe1b6fab | ||
|
|
ebc6525b65 | ||
|
|
c5ae146683 | ||
|
|
70daa9d3fa | ||
|
|
95d3d427a4 | ||
|
|
8de387a92d | ||
|
|
5e6055c9bd | ||
|
|
c4338aaaeb | ||
|
|
ca06352bda | ||
|
|
edf78d7248 | ||
|
|
d0d40c93d3 | ||
|
|
11730ed932 | ||
|
|
0c4737aca1 | ||
|
|
159390f989 | ||
|
|
5de8521ac8 | ||
|
|
d957474618 | ||
|
|
7c56785fcc | ||
|
|
debc187874 | ||
|
|
6ccac55e1d | ||
|
|
ed77a6753c | ||
|
|
6e7df6e1f7 | ||
|
|
4f867dabe6 | ||
|
|
106a917dbc | ||
|
|
2cf5b9710a | ||
|
|
c60e7e906d | ||
|
|
7521678e5f | ||
|
|
d828e961bd | ||
|
|
fef84f8559 | ||
|
|
39b112dacc | ||
|
|
6054a6509c | ||
|
|
6f3a38d708 | ||
|
|
8e0fa710ee | ||
|
|
309c6d345b | ||
|
|
6a466d2c9c | ||
|
|
7a81d3b6ef | ||
|
|
b0a4820e80 | ||
|
|
fe569a6fbc | ||
|
|
b556eac851 | ||
|
|
84aea0e869 | ||
|
|
841e102971 | ||
|
|
7f65e1e48c | ||
|
|
99a5a85248 | ||
|
|
6cc1eb2c0f | ||
|
|
3d77a7a2cd | ||
|
|
53dd12e339 | ||
|
|
0c3d388f5a | ||
|
|
f73788fab3 | ||
|
|
b5bac7690e | ||
|
|
1438783c07 | ||
|
|
bca7c5340a | ||
|
|
794d3733c1 | ||
|
|
f63f63bb43 | ||
|
|
10c821c466 | ||
|
|
85094805f2 | ||
|
|
adab5487fd | ||
|
|
263933c589 | ||
|
|
120fcf3b37 | ||
|
|
d5542f7555 | ||
|
|
82e4411b45 | ||
|
|
62bba0ffa6 | ||
|
|
f5e45ce938 | ||
|
|
d342cdb6ad | ||
|
|
9b69ed417e | ||
|
|
e689f206cb | ||
|
|
8f80498c2e | ||
|
|
4d07d2c8b1 | ||
|
|
ac31067333 | ||
|
|
c293c39118 | ||
|
|
b8d148e79d | ||
|
|
b29cc6824c | ||
|
|
7d73bc8b23 | ||
|
|
22dbf290b4 | ||
|
|
dcec1e2e95 | ||
|
|
a64b5c1046 | ||
|
|
a5b0b2a1b5 | ||
|
|
6643d417b7 | ||
|
|
9ad20d013b | ||
|
|
37c8e5924f | ||
|
|
ea62a22998 | ||
|
|
fa744b1b97 | ||
|
|
15907a6112 | ||
|
|
b58b6d8375 | ||
|
|
ffa1fdbf1a | ||
|
|
5b646f9618 | ||
|
|
cbff8d50fa | ||
|
|
cc37fcfa78 | ||
|
|
71d6e692eb | ||
|
|
045667dce8 | ||
|
|
93dcf5b68a | ||
|
|
1b383e1d57 | ||
|
|
83c03cc3c7 | ||
|
|
419fa31d6e | ||
|
|
17bb3f66e8 | ||
|
|
97ba43a898 | ||
|
|
51bbcc2a7d | ||
|
|
8e8a78ca10 | ||
|
|
dd062c673f | ||
|
|
4cb57c5f1e | ||
|
|
bf1ef04ce2 | ||
|
|
4a86604bcc | ||
|
|
6610c1a50c | ||
|
|
957d7e5722 | ||
|
|
9844d0cff4 | ||
|
|
141ffeb474 | ||
|
|
31614d0c4d | ||
|
|
3817fc2cc6 | ||
|
|
3a278c1f5b | ||
|
|
6c8a6b2822 | ||
|
|
0d4c7a7e28 | ||
|
|
97b23cd002 | ||
|
|
97ec85ba2a | ||
|
|
cdfaadf986 | ||
|
|
9919853d07 | ||
|
|
a0477b03e3 | ||
|
|
d4d31efeb7 | ||
|
|
5fd3f379fc | ||
|
|
b2fca4c55a | ||
|
|
1a7b97b8b2 | ||
|
|
247016b61d | ||
|
|
13f1e6a713 | ||
|
|
f9e332cac7 | ||
|
|
0b3483fb8a | ||
|
|
9379ab131c | ||
|
|
5fa698f5b7 | ||
|
|
83991c132a | ||
|
|
6e7190b6bd | ||
|
|
9791118581 | ||
|
|
186ea7e8c3 | ||
|
|
3184df7d6c | ||
|
|
06284ecd13 | ||
|
|
4150f8c032 | ||
|
|
8051186de3 | ||
|
|
d9c97d3ef5 | ||
|
|
73d59e082d | ||
|
|
57273dd96f | ||
|
|
b4e023b7ce | ||
|
|
924e74d3c8 | ||
|
|
335d326a73 | ||
|
|
d572a67855 | ||
|
|
328608dfff | ||
|
|
be78216ff3 | ||
|
|
24a29f2251 | ||
|
|
d4655112ca | ||
|
|
f30710c5a8 | ||
|
|
eee94086db | ||
|
|
ca152ecbc0 | ||
|
|
fce4823d2c | ||
|
|
a20b95b87c | ||
|
|
640571a6bc | ||
|
|
2ad0085370 | ||
|
|
053d3191c8 | ||
|
|
6b6f5ee09d | ||
|
|
481296ad21 | ||
|
|
55d4a639d9 | ||
|
|
b19c9fc885 | ||
|
|
a2abd43fd2 | ||
|
|
1ab9d95b9c | ||
|
|
08b490a3cc | ||
|
|
919c7127e7 | ||
|
|
98550c31c9 | ||
|
|
4deff42aff | ||
|
|
e8cbd81ad0 | ||
|
|
54a8fbd185 | ||
|
|
49c6a7806b | ||
|
|
251e90433e | ||
|
|
3f7d1f588b | ||
|
|
9a3b073fc6 | ||
|
|
f92761437d | ||
|
|
f186907d8b | ||
|
|
718bd99c24 | ||
|
|
5c0f39759e | ||
|
|
bc9607a735 | ||
|
|
01e40c4684 | ||
|
|
69fe2d7b3a | ||
|
|
363dd5358f | ||
|
|
3487194415 | ||
|
|
08dc9e0be9 | ||
|
|
781b2238c6 | ||
|
|
e51504b3ec | ||
|
|
af0e578a44 | ||
|
|
140970ac37 | ||
|
|
0b78332a20 | ||
|
|
c9f08a3e6e | ||
|
|
52a1f42426 | ||
|
|
7bbba6e897 | ||
|
|
0f5008f301 | ||
|
|
dc1022e6f3 | ||
|
|
63eaaa325e | ||
|
|
819738cc77 | ||
|
|
d096e603d4 | ||
|
|
0d614fe0c3 | ||
|
|
d8ed965282 | ||
|
|
39092ff18e | ||
|
|
7d297a5c96 | ||
|
|
785fdea56d | ||
|
|
b8198c0d4f | ||
|
|
58f755d136 | ||
|
|
8d1c244e02 | ||
|
|
37898bee60 | ||
|
|
7b05d1d1b6 | ||
|
|
625b7d9a81 | ||
|
|
cb08443b27 | ||
|
|
207361d227 | ||
|
|
de5b5bdda5 | ||
|
|
e25472fc18 | ||
|
|
026d296d8f | ||
|
|
537017925f | ||
|
|
37af01483a | ||
|
|
726f5e851d | ||
|
|
1ddd868449 | ||
|
|
4a6e47c86b | ||
|
|
02b893cc89 | ||
|
|
b8f89e97cd | ||
|
|
42c8ee8adf | ||
|
|
9d0a49b2be | ||
|
|
5de5a5cd91 | ||
|
|
73fa0951f7 | ||
|
|
4e3879a949 | ||
|
|
7f55829035 | ||
|
|
63dd826377 | ||
|
|
2565774fea | ||
|
|
c72974de27 | ||
|
|
676e7be9fb | ||
|
|
cfca0434ba | ||
|
|
8264f72a5a | ||
|
|
3cb6ba237c | ||
|
|
e8e8dc2828 | ||
|
|
8a5b07f8d2 | ||
|
|
98f0d7ed31 | ||
|
|
dc45f7625a | ||
|
|
694727f6d6 | ||
|
|
3f991ddb63 | ||
|
|
17b7aa1ca7 | ||
|
|
62bed608cb | ||
|
|
c089d9f5a5 | ||
|
|
45843a2c89 | ||
|
|
d812485386 | ||
|
|
0746abd2f1 | ||
|
|
534a546efb | ||
|
|
e5166ca42a | ||
|
|
8368c669ce | ||
|
|
b33c31eb81 | ||
|
|
27d97c1287 | ||
|
|
314a310dce | ||
|
|
f2365e6e67 | ||
|
|
025373aa1a | ||
|
|
248918f875 | ||
|
|
9666dc67f9 | ||
|
|
c7af76af56 | ||
|
|
9fe1d2ee50 | ||
|
|
c11daf2898 | ||
|
|
992627f1f2 | ||
|
|
4d27b189d7 | ||
|
|
221735cd40 | ||
|
|
94c768c823 | ||
|
|
9d31926401 | ||
|
|
6b875b8218 | ||
|
|
6806c018af | ||
|
|
26f6bdeaca | ||
|
|
50a7441808 | ||
|
|
ced993af1f | ||
|
|
3f664ca6f6 | ||
|
|
3f59a11ddc | ||
|
|
ab2ab5d606 | ||
|
|
a0e1845658 | ||
|
|
69e1bc3948 | ||
|
|
02816f99c0 | ||
|
|
9edba5aacc | ||
|
|
921116a198 | ||
|
|
4923a59b76 | ||
|
|
705b9e62dc | ||
|
|
149ea9a3ff | ||
|
|
87c261a42d | ||
|
|
ff6d26cc59 | ||
|
|
6c098cc1fa | ||
|
|
47bba0b927 | ||
|
|
7f80b13e2d | ||
|
|
3e834f0104 | ||
|
|
2c26bd7396 | ||
|
|
a1206af764 | ||
|
|
9c4c3d3843 | ||
|
|
a82f1ce09a | ||
|
|
0a6f16a5b9 | ||
|
|
deee3b75ff | ||
|
|
7c19ab8ca0 | ||
|
|
66cb4eed97 | ||
|
|
35c1c603b5 | ||
|
|
6ff497f9f5 | ||
|
|
d1e22ecc56 | ||
|
|
13da2e766d | ||
|
|
ff4720217a | ||
|
|
c678e5e2a6 | ||
|
|
1d52b18c88 | ||
|
|
2a40965ba0 | ||
|
|
e8b5a8268f | ||
|
|
ce6a72c71c | ||
|
|
d766341bb3 | ||
|
|
b18f76c4db | ||
|
|
879e176aa9 | ||
|
|
63ffe93902 | ||
|
|
b968c38605 | ||
|
|
6869d6b257 | ||
|
|
dc8b8eae78 | ||
|
|
1b24cdb1c5 | ||
|
|
51e850ddc2 | ||
|
|
abcb01163d | ||
|
|
224d44a50a | ||
|
|
c691aa0b47 | ||
|
|
5768640c2b | ||
|
|
8533eeda2f | ||
|
|
3a27d21dc1 | ||
|
|
bdef1b1440 | ||
|
|
21fac30350 | ||
|
|
900475c53c | ||
|
|
f19b0d1a46 | ||
|
|
54621631e6 | ||
|
|
a32f50fd5e | ||
|
|
2358f54c3c | ||
|
|
da7af1fca0 | ||
|
|
d907d1eecc | ||
|
|
c80a12f2a3 | ||
|
|
117cf27177 | ||
|
|
ac3888f7c8 | ||
|
|
e5c137f82b | ||
|
|
b224c6ab82 | ||
|
|
2b76a61178 | ||
|
|
0466da8fe9 | ||
|
|
bc50e86948 | ||
|
|
43ac827d5b | ||
|
|
55e20de0a4 | ||
|
|
454a4c5548 | ||
|
|
4209e7fac3 | ||
|
|
f19eff244f | ||
|
|
61673153d5 | ||
|
|
f777f4af6c | ||
|
|
714297e786 | ||
|
|
0a3b2c4be9 | ||
|
|
6d97c2e3ee | ||
|
|
ba99e37380 | ||
|
|
40cb874969 | ||
|
|
aa0b1845e3 | ||
|
|
49820acb47 | ||
|
|
b77722f241 | ||
|
|
5d28a884fb | ||
|
|
b87c6fb835 | ||
|
|
8cc807cfe5 | ||
|
|
5ee7513ed6 | ||
|
|
47edd1bd55 | ||
|
|
1a2d6bac39 | ||
|
|
7f8b1ca787 | ||
|
|
1078bdbb1c | ||
|
|
5761baf3f9 | ||
|
|
ab2d02edea | ||
|
|
fcebd0a454 | ||
|
|
e4f1081155 | ||
|
|
e48230ee70 | ||
|
|
54efdf75fe | ||
|
|
b928c849e9 | ||
|
|
8cf399dd9b | ||
|
|
b73f00c644 | ||
|
|
2cf90be995 | ||
|
|
b4f5df945e | ||
|
|
30f45cd045 | ||
|
|
cf3ff6164c | ||
|
|
cd055cf429 | ||
|
|
45c6c37c65 | ||
|
|
83d6011345 | ||
|
|
44456fbb7a | ||
|
|
4c924ad13d | ||
|
|
63afe19f77 | ||
|
|
6e51e259bb | ||
|
|
23ac8071bc | ||
|
|
90ab166ffa | ||
|
|
30c1653862 | ||
|
|
2c5216aaee | ||
|
|
c117550a8d | ||
|
|
df5eb24efd | ||
|
|
1d399b27ba | ||
|
|
a1b68bb1a5 | ||
|
|
934ccec329 | ||
|
|
75ee24d154 | ||
|
|
76ca6c2db9 | ||
|
|
d099074288 | ||
|
|
9c200c9742 | ||
|
|
7bf96cb07f | ||
|
|
15419507a3 | ||
|
|
0ef759188e | ||
|
|
4fbb0ad83a | ||
|
|
fe43a2ad5b | ||
|
|
d738b6a9c2 | ||
|
|
5ccd601695 | ||
|
|
3e15b84867 | ||
|
|
b2b724969b | ||
|
|
1d619cd892 | ||
|
|
cf4cbfa605 | ||
|
|
1ec12b7702 | ||
|
|
e04cd6b3d0 | ||
|
|
ecae37d613 | ||
|
|
315068f77c | ||
|
|
a9217379ec | ||
|
|
05e8e49035 | ||
|
|
646638e2cd | ||
|
|
cbdfcaad0d | ||
|
|
2b560309a7 | ||
|
|
240062176d | ||
|
|
6e9d5f5e8a | ||
|
|
1c27cf7360 | ||
|
|
0d406b8360 | ||
|
|
617a8da93f | ||
|
|
1c1c80c051 | ||
|
|
5ec5054c08 | ||
|
|
ec2d071a2c | ||
|
|
751859461b | ||
|
|
06962c6ded | ||
|
|
0ba49b2a7c | ||
|
|
a369d4cb08 | ||
|
|
073484076b | ||
|
|
68d5a5c29e | ||
|
|
f71e9c0cc5 | ||
|
|
db9a6cd8f8 | ||
|
|
eb874ade0f | ||
|
|
af51fe8b99 | ||
|
|
2a8dcb7bf0 | ||
|
|
c8d0a7dd39 | ||
|
|
f5fa14ba7a | ||
|
|
e5037429e5 | ||
|
|
f4cc43fc64 | ||
|
|
2905c1339d | ||
|
|
d1152d5d3e | ||
|
|
2f9cc373ce | ||
|
|
586d42ebde | ||
|
|
137dfb2b3c | ||
|
|
43fa00ae1d | ||
|
|
41af00603d | ||
|
|
9cfb1e1ebe | ||
|
|
b1f94b965f | ||
|
|
aa58312454 | ||
|
|
a1b7bb8cce | ||
|
|
9957e2ec15 | ||
|
|
445f5c662a | ||
|
|
fa235857b7 | ||
|
|
2441a23871 | ||
|
|
cdc107fcb2 | ||
|
|
3951f0116a | ||
|
|
24668b768b | ||
|
|
e4518f7039 | ||
|
|
696b0d83c6 | ||
|
|
dbb71e2ae3 | ||
|
|
cfbf1945dd | ||
|
|
3fdf5dc5f7 | ||
|
|
34ca408770 | ||
|
|
7ff9147b30 | ||
|
|
00968ceefe | ||
|
|
c026adb9d6 | ||
|
|
5557edc342 | ||
|
|
98795c8220 | ||
|
|
22158c3250 | ||
|
|
65f0ac62fe | ||
|
|
f730729cf4 | ||
|
|
3a0c052f8b | ||
|
|
b4173d827a | ||
|
|
8c80565535 | ||
|
|
eabe95a00c | ||
|
|
459e79d261 | ||
|
|
48ae3eb3e9 | ||
|
|
a69509b145 | ||
|
|
b5a7919aab | ||
|
|
632582998f | ||
|
|
27f85d941b | ||
|
|
667cb7f155 | ||
|
|
eab75ae831 | ||
|
|
94ffa5462f | ||
|
|
4718d07561 | ||
|
|
869ebcfdff | ||
|
|
61ea28b1aa | ||
|
|
9f8db2255b | ||
|
|
cb18362241 | ||
|
|
d4614d8162 | ||
|
|
8bf9db6155 | ||
|
|
73eb5b000e | ||
|
|
ba3d015093 | ||
|
|
92bda66c12 | ||
|
|
a6f6753fa0 | ||
|
|
e64f3bf8c3 | ||
|
|
2951f9a0db | ||
|
|
53bc4a559a | ||
|
|
7d57b09371 | ||
|
|
9182c61011 | ||
|
|
a3ecfe8d5f | ||
|
|
0507ff3937 | ||
|
|
250676ce89 | ||
|
|
5e3ab3b6ea | ||
|
|
8a47dd873f | ||
|
|
d5a71976d2 | ||
|
|
f072f58cb6 | ||
|
|
a4cd04fd11 | ||
|
|
61b01d7c2d | ||
|
|
6a492b68ad | ||
|
|
857ec067b9 | ||
|
|
03b28a0252 | ||
|
|
0ae45bfca0 | ||
|
|
95caffe82b | ||
|
|
ab370be1c0 | ||
|
|
b1b98f9b55 | ||
|
|
d176cb9b8f | ||
|
|
a78a5ddb04 | ||
|
|
09b4912801 | ||
|
|
e1fa49d1f7 | ||
|
|
83c4a57acc | ||
|
|
78b7582b8d | ||
|
|
2e48fe919a | ||
|
|
ee886cddfd | ||
|
|
1607275d2d | ||
|
|
0d9ec1c164 | ||
|
|
804d661c31 | ||
|
|
cfe0cefeb3 | ||
|
|
57491b8062 | ||
|
|
3a5405e032 | ||
|
|
c57c9db54a | ||
|
|
04af799052 | ||
|
|
9e11f5eba0 | ||
|
|
8035ba81f8 | ||
|
|
d9a885647b | ||
|
|
53889efa8d | ||
|
|
821870f496 | ||
|
|
37598fac3d | ||
|
|
4c5a12ec89 | ||
|
|
2f526d6cb3 | ||
|
|
2fce5f6d6a | ||
|
|
f1772a2108 | ||
|
|
e5c90b25b2 | ||
|
|
412c119131 | ||
|
|
e099b45495 | ||
|
|
945f9cdc78 | ||
|
|
be5672c352 | ||
|
|
7759f128d2 | ||
|
|
c84c49c761 | ||
|
|
385391bf1f | ||
|
|
17ad609424 | ||
|
|
be793a9fd1 | ||
|
|
ffeaed336e | ||
|
|
408e66f793 | ||
|
|
8b9adfb9f8 | ||
|
|
f5617abd9e | ||
|
|
991b3e68aa | ||
|
|
ef220b1c40 | ||
|
|
e92cb7fb01 | ||
|
|
6efe100064 | ||
|
|
b9ca5f7066 | ||
|
|
66c6460bab | ||
|
|
c73c5d28a1 | ||
|
|
3c1f5cfdf5 | ||
|
|
5fd3abcbd0 | ||
|
|
f3d2b5ba9c | ||
|
|
bc211f2f55 | ||
|
|
39422f060f | ||
|
|
19e3804227 | ||
|
|
036c819922 | ||
|
|
8c72cb8fa0 | ||
|
|
2a0efac1da | ||
|
|
30943eb331 | ||
|
|
6508ebb34a | ||
|
|
f3fec2c58c | ||
|
|
f92b9ff6cb | ||
|
|
65566a51df | ||
|
|
0eee495a38 | ||
|
|
9d3e36cdab | ||
|
|
860407533f | ||
|
|
b5b60fff45 | ||
|
|
e46ee644ae | ||
|
|
d8156b0ee3 | ||
|
|
4c49f61376 |
@@ -8,10 +8,12 @@ DB_HOST=localhost
|
||||
DB_DATABASE=cachet
|
||||
DB_USERNAME=homestead
|
||||
DB_PASSWORD=secret
|
||||
DB_PORT=null
|
||||
DB_PREFIX=null
|
||||
|
||||
CACHE_DRIVER=file
|
||||
SESSION_DRIVER=file
|
||||
QUEUE_DRIVER=database
|
||||
QUEUE_DRIVER=sync
|
||||
CACHET_EMOJI=false
|
||||
|
||||
MAIL_DRIVER=smtp
|
||||
|
||||
2
.gitattributes
vendored
2
.gitattributes
vendored
@@ -1,3 +1,5 @@
|
||||
* text=auto
|
||||
*.css linguist-vendored
|
||||
*.scss linguist-vendored
|
||||
/.github export-ignore
|
||||
/tests export-ignore
|
||||
|
||||
25
.github/ISSUE_TEMPLATE
vendored
Normal file
25
.github/ISSUE_TEMPLATE
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
Before submitting your issue, please make sure that you've checked all of the checkboxes below.
|
||||
|
||||
- [ ] You're running the [latest release](https://github.com/CachetHQ/Cachet/releases/latest) version of Cachet.
|
||||
- [ ] Ensure that you're running at least PHP 5.5.9, you can check this by running `php -v`
|
||||
- [ ] You've ran `rm -rf bootstrap/cache/*` from the root of your Cachet installation.
|
||||
|
||||
To help us better understand your issue, please answer the following — cheers!
|
||||
|
||||
### Your setup
|
||||
|
||||
- *What version of Cachet?*
|
||||
- *What database driver? MySQL? Postgres? SQLite?*
|
||||
- *What version of PHP?*
|
||||
|
||||
### Expected behaviour
|
||||
|
||||
*Please describe what you're expecting to see happen.*
|
||||
|
||||
### Actual behaviour
|
||||
|
||||
*Please describe what you're actually seeing happen.*
|
||||
|
||||
### Steps to reproduce
|
||||
|
||||
*If your issue requires any specific steps to reproduce, please outline them here.*
|
||||
14
.travis.yml
14
.travis.yml
@@ -1,10 +1,10 @@
|
||||
language: php
|
||||
|
||||
php:
|
||||
- 7.0
|
||||
- 5.6
|
||||
- 5.5
|
||||
- 5.5.9
|
||||
- 5.5
|
||||
- 5.6
|
||||
- 7.0
|
||||
- hhvm
|
||||
|
||||
sudo: false
|
||||
@@ -13,9 +13,9 @@ install:
|
||||
- travis_retry composer install --no-interaction --no-scripts --prefer-source
|
||||
|
||||
script:
|
||||
- if [ "$TRAVIS_PHP_VERSION" != "5.5.9" ] && [ "$TRAVIS_PHP_VERSION" != "5.5" ] && [ "$TRAVIS_PHP_VERSION" != "5.6" ]; then vendor/bin/phpunit; fi
|
||||
- if [ "$TRAVIS_PHP_VERSION" == "5.5.9" ] || [ "$TRAVIS_PHP_VERSION" == "5.5" ] || [ "$TRAVIS_PHP_VERSION" == "5.6" ]; then vendor/bin/phpunit --coverage-clover build/logs/clover.xml; fi
|
||||
- if [ "$TRAVIS_PHP_VERSION" != "5.6" ] || [ "$TRAVIS_PULL_REQUEST" != false ]; then vendor/bin/phpunit; fi
|
||||
- if [ "$TRAVIS_PHP_VERSION" == "5.6" ] && [ "$TRAVIS_PULL_REQUEST" == false ]; then vendor/bin/phpunit --coverage-clover build/logs/clover.xml; fi
|
||||
|
||||
after_script:
|
||||
- if [ "$TRAVIS_PHP_VERSION" == "5.5.9" ] || [ "$TRAVIS_PHP_VERSION" == "5.5" ] || [ "$TRAVIS_PHP_VERSION" == "5.6" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
|
||||
- if [ "$TRAVIS_PHP_VERSION" == "5.5.9" ] || [ "$TRAVIS_PHP_VERSION" == "5.5" ] || [ "$TRAVIS_PHP_VERSION" == "5.6" ]; then php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml; fi
|
||||
- if [ "$TRAVIS_PHP_VERSION" == "5.6" ] && [ "$TRAVIS_PULL_REQUEST" == false ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
|
||||
- if [ "$TRAVIS_PHP_VERSION" == "5.6" ] && [ "$TRAVIS_PULL_REQUEST" == false ]; then php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml; fi
|
||||
|
||||
@@ -8,9 +8,7 @@ Feature requests and bug reports should be made by using the [issue tracker](htt
|
||||
|
||||
## Languages
|
||||
|
||||
When needing to add labels, placeholders or general text, you **must not** write directly into the source file, rather make use of the `./resources/lang/` directory.
|
||||
|
||||
Always provide the English translation and copy your English string to all other languages - making sure that the indentation and alignment of the arrays are updated.
|
||||
Any non-English translations must be made on the [Cachet CrowdIn](https://translate.cachethq.io) project. This makes syncing translations much easier.
|
||||
|
||||
## Coding Standards
|
||||
|
||||
|
||||
2
LICENSE
2
LICENSE
@@ -1,4 +1,4 @@
|
||||
Copyright (c) 2015 Alt Three Services Limited.
|
||||
Copyright (c) 2015-2016 Alt Three Services Limited.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
60
README.md
60
README.md
@@ -1,13 +1,16 @@
|
||||
# Cachet
|
||||
|
||||
[](https://styleci.io/repos/26730195/)
|
||||
[](https://travis-ci.org/cachethq/Cachet)
|
||||
[](https://scrutinizer-ci.com/g/cachethq/Cachet)
|
||||
[](https://travis-ci.org/CachetHQ/Cachet)
|
||||
[](https://scrutinizer-ci.com/g/CachetHQ/Cachet)
|
||||
[](LICENSE)
|
||||
[](http://translate.cachethq.io/project/cachet)
|
||||
[](https://packagist.org/packages/cachethq/cachet)
|
||||
|
||||

|
||||
|
||||
Cachet is a beautiful and powerful open source status page system, a free replacement to services such as StatusPage.io, Status.io and others.
|
||||
|
||||
## Features
|
||||
|
||||
- List your services components
|
||||
@@ -28,15 +31,46 @@ The `master` branch of this repository is a development branch and **should not*
|
||||
## Requirements
|
||||
|
||||
- PHP 5.5.9+ or newer
|
||||
- Apache or Nginx server
|
||||
- [Composer](https://getcomposer.org)
|
||||
|
||||
### Development Requirements
|
||||
## How to contribute
|
||||
|
||||
We're always looking for contributions that improve Cachet. It's easy to get started and you don't even need to know how to write a single line of code!
|
||||
|
||||
### Contributing as a non-developer/non-designer
|
||||
|
||||
If you're one of the more linguistically talented people in the world who can speak and write more than just English, we're always looking for new [translations](#translations).
|
||||
|
||||
Of course bug reports, feature requests and [documentation](https://docs.cachethq.io) are always being sought after.
|
||||
|
||||
### Contributing as a designer
|
||||
|
||||
As Cachet gains new features, the design and ideas that were once a perfect fit need updating and in some cases designing from scratch. This is where you come in! Fancy giving Cachet a lick of paint? Sweet!
|
||||
|
||||
You'll need to install Node.js, Bower and Gulp.
|
||||
|
||||
To get started you can do the following:
|
||||
|
||||
1. Install Node.js, Bower and Gulp.
|
||||
2. Install the assets; `bower install`
|
||||
3. Modify the SCSS files in `./resources/assets/sass/`
|
||||
4. Run `gulp`
|
||||
|
||||
If you're making a lot of changes, you'll find that running `gulp watch` will really help you out!
|
||||
|
||||
### Contributing as a developer
|
||||
|
||||
Built using [Laravel](https://laravel.com), Cachet is very easy to jump into. Have a look around you'll find it surprisingly easy!
|
||||
|
||||
These extra dependencies are required to develop Cachet:
|
||||
|
||||
- Node.js
|
||||
- Bower
|
||||
- Gulp
|
||||
- Git
|
||||
|
||||
Once cloned to your local machine, you'll need some demo data! Simply run `php artisan cachet:seed` to get the demo installation on the go.
|
||||
|
||||
## Installation, Upgrades and Documentation
|
||||
|
||||
@@ -50,11 +84,15 @@ You can now find our documentation at [https://docs.cachethq.io](https://docs.ca
|
||||
|
||||
To test out the demo, you may login to the [Dashboard](https://demo.cachethq.io/dashboard) with the following:
|
||||
|
||||
- **Username:** test@test.com
|
||||
- **Username:** test or test@test.com
|
||||
- **Password:** test123
|
||||
|
||||
The demo is reset every half hour.
|
||||
|
||||
### Release Notes
|
||||
|
||||
All releases are listed on the [Releases page](https://github.com/CachetHQ/Cachet/releases) of the [Cachet GitHub repository](https://github.com/CachetHQ/Cachet). On the Releases page, you can also find the release notes for each release.
|
||||
|
||||
## Translations
|
||||
|
||||
A special thank you to our [translators](https://crowdin.com/project/cachet/activity_stream), who have allowed us to share Cachet with the world. If you'd like to contribute translations, please check out our [CrowdIn project](https://crowdin.com/project/cachet).
|
||||
@@ -62,3 +100,17 @@ A special thank you to our [translators](https://crowdin.com/project/cachet/acti
|
||||
## Security Vulnerabilities
|
||||
|
||||
If you discover a security vulnerability within Cachet, please send an e-mail to us at support@alt-three.com. All security vulnerabilities will be promptly addressed.
|
||||
|
||||
## Installations
|
||||
|
||||
We offer a paid installation service, which starts at $99 but is subject to change, dependant on your setup and infrastructure.
|
||||
|
||||
To find out more, email us at support@alt-three.com
|
||||
|
||||
## Donations
|
||||
|
||||
Cachet is open source, we don't have any licensing models and don't run ads on the [website](https://cachethq.io).
|
||||
|
||||
If you'd like to donate towards further development of Cachet you can do so via Paypal.
|
||||
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=D4M5LVULVPPKL)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Commands\Component;
|
||||
namespace CachetHQ\Cachet\Bus\Commands\Component;
|
||||
|
||||
final class AddComponentCommand
|
||||
{
|
||||
@@ -9,7 +9,7 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Commands\Component;
|
||||
namespace CachetHQ\Cachet\Bus\Commands\Component;
|
||||
|
||||
use CachetHQ\Cachet\Models\Component;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Commands\Component;
|
||||
namespace CachetHQ\Cachet\Bus\Commands\Component;
|
||||
|
||||
use CachetHQ\Cachet\Models\Component;
|
||||
|
||||
@@ -9,8 +9,13 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Commands\ComponentGroup;
|
||||
namespace CachetHQ\Cachet\Bus\Commands\ComponentGroup;
|
||||
|
||||
/**
|
||||
* This is the add component group command.
|
||||
*
|
||||
* @author James Brooks <james@alt-three.com>
|
||||
*/
|
||||
final class AddComponentGroupCommand
|
||||
{
|
||||
/**
|
||||
@@ -27,14 +32,22 @@ final class AddComponentGroupCommand
|
||||
*/
|
||||
public $order;
|
||||
|
||||
/**
|
||||
* Is the component group collapsed?
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public $collapsed;
|
||||
|
||||
/**
|
||||
* The validation rules.
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
public $rules = [
|
||||
'name' => 'required|string',
|
||||
'order' => 'int',
|
||||
'name' => 'required|string',
|
||||
'order' => 'int',
|
||||
'collapsed' => 'int|between:0,3',
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -42,12 +55,14 @@ final class AddComponentGroupCommand
|
||||
*
|
||||
* @param string $name
|
||||
* @param int $order
|
||||
* @param int $collapsed
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($name, $order)
|
||||
public function __construct($name, $order, $collapsed)
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->order = (int) $order;
|
||||
$this->collapsed = $collapsed;
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Commands\ComponentGroup;
|
||||
namespace CachetHQ\Cachet\Bus\Commands\ComponentGroup;
|
||||
|
||||
use CachetHQ\Cachet\Models\ComponentGroup;
|
||||
|
||||
@@ -9,10 +9,15 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Commands\ComponentGroup;
|
||||
namespace CachetHQ\Cachet\Bus\Commands\ComponentGroup;
|
||||
|
||||
use CachetHQ\Cachet\Models\ComponentGroup;
|
||||
|
||||
/**
|
||||
* This is the update component group command.
|
||||
*
|
||||
* @author James Brooks <james@alt-three.com>
|
||||
*/
|
||||
final class UpdateComponentGroupCommand
|
||||
{
|
||||
/**
|
||||
@@ -36,14 +41,22 @@ final class UpdateComponentGroupCommand
|
||||
*/
|
||||
public $order;
|
||||
|
||||
/**
|
||||
* Is the component group collapsed?
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public $collapsed;
|
||||
|
||||
/**
|
||||
* The validation rules.
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
public $rules = [
|
||||
'name' => 'string',
|
||||
'order' => 'int',
|
||||
'name' => 'string',
|
||||
'order' => 'int',
|
||||
'collapsed' => 'int|between:0,3',
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -52,13 +65,15 @@ final class UpdateComponentGroupCommand
|
||||
* @param \CachetHQ\Cachet\Models\ComponentGroup $group
|
||||
* @param string $name
|
||||
* @param int $order
|
||||
* @param int $collapsed
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(ComponentGroup $group, $name, $order)
|
||||
public function __construct(ComponentGroup $group, $name, $order, $collapsed)
|
||||
{
|
||||
$this->group = $group;
|
||||
$this->name = $name;
|
||||
$this->order = (int) $order;
|
||||
$this->collapsed = $collapsed;
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Commands\Incident;
|
||||
namespace CachetHQ\Cachet\Bus\Commands\Incident;
|
||||
|
||||
use CachetHQ\Cachet\Models\Incident;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Commands\Incident;
|
||||
namespace CachetHQ\Cachet\Bus\Commands\Incident;
|
||||
|
||||
final class ReportIncidentCommand
|
||||
{
|
||||
@@ -93,7 +93,7 @@ final class ReportIncidentCommand
|
||||
'status' => 'required|int|min:0|max:4',
|
||||
'message' => 'string',
|
||||
'visible' => 'bool',
|
||||
'component_id' => 'int',
|
||||
'component_id' => 'int|required_with:component_status',
|
||||
'component_status' => 'int|min:1|max:4|required_with:component_id',
|
||||
'notify' => 'bool',
|
||||
'incident_date' => 'string',
|
||||
@@ -116,7 +116,7 @@ final class ReportIncidentCommand
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($name, $status, $message, $visible, $component_id, $component_status, $notify, $incident_date, $template, $template_vars)
|
||||
public function __construct($name, $status, $message, $visible, $component_id, $component_status, $notify, $incident_date, $template, array $template_vars = null)
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->status = $status;
|
||||
@@ -9,7 +9,7 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Commands\Incident;
|
||||
namespace CachetHQ\Cachet\Bus\Commands\Incident;
|
||||
|
||||
final class ReportMaintenanceCommand
|
||||
{
|
||||
@@ -9,7 +9,7 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Commands\Incident;
|
||||
namespace CachetHQ\Cachet\Bus\Commands\Incident;
|
||||
|
||||
use CachetHQ\Cachet\Models\Incident;
|
||||
|
||||
@@ -111,7 +111,7 @@ final class UpdateIncidentCommand
|
||||
/**
|
||||
* Create a new update incident command instance.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Models\Incident $name
|
||||
* @param \CachetHQ\Cachet\Models\Incident $incident
|
||||
* @param string $name
|
||||
* @param int $status
|
||||
* @param string $message
|
||||
@@ -125,7 +125,7 @@ final class UpdateIncidentCommand
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Incident $incident, $name, $status, $message, $visible, $component_id, $component_status, $notify, $incident_date, $template, $template_vars)
|
||||
public function __construct(Incident $incident, $name, $status, $message, $visible, $component_id, $component_status, $notify, $incident_date, $template, array $template_vars = null)
|
||||
{
|
||||
$this->incident = $incident;
|
||||
$this->name = $name;
|
||||
@@ -9,25 +9,27 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Commands\Invite;
|
||||
namespace CachetHQ\Cachet\Bus\Commands\Invite;
|
||||
|
||||
use CachetHQ\Cachet\Models\Invite;
|
||||
|
||||
final class ClaimInviteCommand
|
||||
{
|
||||
/**
|
||||
* The invte to mark as claimed.
|
||||
* The invite to mark as claimed.
|
||||
*
|
||||
* @var \CachetHQ\Cachet\Model\Invite
|
||||
* @var \CachetHQ\Cachet\Models\Invite
|
||||
*/
|
||||
public $invite;
|
||||
|
||||
/**
|
||||
* Create a new claim invite command instance.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Model\Invite $invite
|
||||
* @param \CachetHQ\Cachet\Models\Invite $invite
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($invite)
|
||||
public function __construct(Invite $invite)
|
||||
{
|
||||
$this->invite = $invite;
|
||||
}
|
||||
@@ -9,7 +9,7 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Commands\Metric;
|
||||
namespace CachetHQ\Cachet\Bus\Commands\Metric;
|
||||
|
||||
final class AddMetricCommand
|
||||
{
|
||||
@@ -62,6 +62,13 @@ final class AddMetricCommand
|
||||
*/
|
||||
public $places;
|
||||
|
||||
/**
|
||||
* The view to show the metric points in.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public $default_view;
|
||||
|
||||
/**
|
||||
* The validation rules.
|
||||
*
|
||||
@@ -76,6 +83,7 @@ final class AddMetricCommand
|
||||
'calc_type' => 'int',
|
||||
'display_chart' => 'int',
|
||||
'places' => 'int|between:0,4',
|
||||
'default_view' => 'int|between:0,3',
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -88,10 +96,11 @@ final class AddMetricCommand
|
||||
* @param int $calc_type
|
||||
* @param int $display_chart
|
||||
* @param int $places
|
||||
* @param int $default_view
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($name, $suffix, $description, $default_value, $calc_type, $display_chart, $places)
|
||||
public function __construct($name, $suffix, $description, $default_value, $calc_type, $display_chart, $places, $default_view)
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->suffix = $suffix;
|
||||
@@ -100,5 +109,6 @@ final class AddMetricCommand
|
||||
$this->calc_type = $calc_type;
|
||||
$this->display_chart = $display_chart;
|
||||
$this->places = $places;
|
||||
$this->default_view = $default_view;
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Commands\Metric;
|
||||
namespace CachetHQ\Cachet\Bus\Commands\Metric;
|
||||
|
||||
use CachetHQ\Cachet\Models\Metric;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Commands\Metric;
|
||||
namespace CachetHQ\Cachet\Bus\Commands\Metric;
|
||||
|
||||
use CachetHQ\Cachet\Models\Metric;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Commands\Metric;
|
||||
namespace CachetHQ\Cachet\Bus\Commands\Metric;
|
||||
|
||||
use CachetHQ\Cachet\Models\MetricPoint;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Commands\Metric;
|
||||
namespace CachetHQ\Cachet\Bus\Commands\Metric;
|
||||
|
||||
use CachetHQ\Cachet\Models\Metric;
|
||||
|
||||
@@ -71,6 +71,13 @@ final class UpdateMetricCommand
|
||||
*/
|
||||
public $places;
|
||||
|
||||
/**
|
||||
* The view to show the metric points in.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public $default_view;
|
||||
|
||||
/**
|
||||
* The validation rules.
|
||||
*
|
||||
@@ -84,7 +91,8 @@ final class UpdateMetricCommand
|
||||
'default_value' => 'numeric',
|
||||
'calc_type' => 'int|in:0,1',
|
||||
'display_chart' => 'int',
|
||||
'places' => 'numeric|min:0|max:4',
|
||||
'places' => 'numeric|between:0,4',
|
||||
'default_view' => 'numeric|between:0,4',
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -98,10 +106,11 @@ final class UpdateMetricCommand
|
||||
* @param int $calc_type
|
||||
* @param int $display_chart
|
||||
* @param int $places
|
||||
* @param int $default_view
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Metric $metric, $name, $suffix, $description, $default_value, $calc_type, $display_chart, $places)
|
||||
public function __construct(Metric $metric, $name, $suffix, $description, $default_value, $calc_type, $display_chart, $places, $default_view)
|
||||
{
|
||||
$this->metric = $metric;
|
||||
$this->name = $name;
|
||||
@@ -111,5 +120,6 @@ final class UpdateMetricCommand
|
||||
$this->calc_type = $calc_type;
|
||||
$this->display_chart = $display_chart;
|
||||
$this->places = $places;
|
||||
$this->default_view = $default_view;
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Commands\Metric;
|
||||
namespace CachetHQ\Cachet\Bus\Commands\Metric;
|
||||
|
||||
use CachetHQ\Cachet\Models\Metric;
|
||||
use CachetHQ\Cachet\Models\MetricPoint;
|
||||
@@ -9,8 +9,13 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Commands\Subscriber;
|
||||
namespace CachetHQ\Cachet\Bus\Commands\Subscriber;
|
||||
|
||||
/**
|
||||
* This is the subscribe subscriber command.
|
||||
*
|
||||
* @author James Brooks <james@alt-three.com>
|
||||
*/
|
||||
final class SubscribeSubscriberCommand
|
||||
{
|
||||
/**
|
||||
@@ -27,6 +32,13 @@ final class SubscribeSubscriberCommand
|
||||
*/
|
||||
public $verified;
|
||||
|
||||
/**
|
||||
* The subscriptions that we want to add.
|
||||
*
|
||||
* @var array|null
|
||||
*/
|
||||
public $subscriptions;
|
||||
|
||||
/**
|
||||
* The validation rules.
|
||||
*
|
||||
@@ -39,14 +51,16 @@ final class SubscribeSubscriberCommand
|
||||
/**
|
||||
* Create a new subscribe subscriber command instance.
|
||||
*
|
||||
* @param string $email
|
||||
* @param bool $verified
|
||||
* @param string $email
|
||||
* @param bool $verified
|
||||
* @param null|array $subscriptions
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($email, $verified = false)
|
||||
public function __construct($email, $verified = false, $subscriptions = null)
|
||||
{
|
||||
$this->email = $email;
|
||||
$this->verified = $verified;
|
||||
$this->subscriptions = $subscriptions;
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Commands\Subscriber;
|
||||
namespace CachetHQ\Cachet\Bus\Commands\Subscriber;
|
||||
|
||||
use CachetHQ\Cachet\Models\Subscriber;
|
||||
|
||||
@@ -25,7 +25,7 @@ final class UnsubscribeSubscriberCommand
|
||||
/**
|
||||
* Create a unsubscribe subscriber command instance.
|
||||
*
|
||||
* @param string $subscriber
|
||||
* @param \CachetHQ\Cachet\Models\Subscriber $subscriber
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Cachet.
|
||||
*
|
||||
* (c) Alt Three Services Limited
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Bus\Commands\Subscriber;
|
||||
|
||||
use CachetHQ\Cachet\Models\Subscription;
|
||||
|
||||
final class UnsubscribeSubscriptionCommand
|
||||
{
|
||||
/**
|
||||
* The subscription to unsubscribe.
|
||||
*
|
||||
* @var \CachetHQ\Cachet\Models\Subscription
|
||||
*/
|
||||
public $subscription;
|
||||
|
||||
/**
|
||||
* Create a unsubscribe subscription command instance.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Models\Subscription $subscription
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Subscription $subscription)
|
||||
{
|
||||
$this->subscription = $subscription;
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Commands\Subscriber;
|
||||
namespace CachetHQ\Cachet\Bus\Commands\Subscriber;
|
||||
|
||||
use CachetHQ\Cachet\Models\Subscriber;
|
||||
|
||||
@@ -25,7 +25,7 @@ final class VerifySubscriberCommand
|
||||
/**
|
||||
* Create a verify subscriber command instance.
|
||||
*
|
||||
* @param string $subscriber
|
||||
* @param \CachetHQ\Cachet\Models\Subscriber $subscriber
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@@ -9,7 +9,7 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Commands\User;
|
||||
namespace CachetHQ\Cachet\Bus\Commands\User;
|
||||
|
||||
final class AddTeamMemberCommand
|
||||
{
|
||||
@@ -9,7 +9,9 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Commands\User;
|
||||
namespace CachetHQ\Cachet\Bus\Commands\User;
|
||||
|
||||
use CachetHQ\Cachet\Models\User;
|
||||
|
||||
final class GenerateApiTokenCommand
|
||||
{
|
||||
@@ -27,7 +29,7 @@ final class GenerateApiTokenCommand
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($user)
|
||||
public function __construct(User $user)
|
||||
{
|
||||
$this->user = $user;
|
||||
}
|
||||
@@ -9,12 +9,12 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Commands\User;
|
||||
namespace CachetHQ\Cachet\Bus\Commands\User;
|
||||
|
||||
final class InviteTeamMemberCommand
|
||||
{
|
||||
/**
|
||||
* The invte emails.
|
||||
* The invite emails.
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
@@ -32,11 +32,11 @@ final class InviteTeamMemberCommand
|
||||
/**
|
||||
* Create a new invite team member command instance.
|
||||
*
|
||||
* @param array $email
|
||||
* @param string[] $emails
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($emails)
|
||||
public function __construct(array $emails)
|
||||
{
|
||||
$this->emails = $emails;
|
||||
}
|
||||
@@ -9,7 +9,7 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Commands\User;
|
||||
namespace CachetHQ\Cachet\Bus\Commands\User;
|
||||
|
||||
use CachetHQ\Cachet\Models\User;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Commands\User;
|
||||
namespace CachetHQ\Cachet\Bus\Commands\User;
|
||||
|
||||
final class SignupUserCommand
|
||||
{
|
||||
19
app/Bus/Events/Component/ComponentEventInterface.php
Normal file
19
app/Bus/Events/Component/ComponentEventInterface.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Cachet.
|
||||
*
|
||||
* (c) Alt Three Services Limited
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Bus\Events\Component;
|
||||
|
||||
use CachetHQ\Cachet\Bus\Events\EventInterface;
|
||||
|
||||
interface ComponentEventInterface extends EventInterface
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -9,11 +9,11 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Events\Component;
|
||||
namespace CachetHQ\Cachet\Bus\Events\Component;
|
||||
|
||||
use CachetHQ\Cachet\Models\Component;
|
||||
|
||||
class ComponentWasAddedEvent
|
||||
final class ComponentWasAddedEvent implements ComponentEventInterface
|
||||
{
|
||||
/**
|
||||
* The component that was added.
|
||||
@@ -25,6 +25,8 @@ class ComponentWasAddedEvent
|
||||
/**
|
||||
* Create a new component was added event instance.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Models\Component $component
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Component $component)
|
||||
@@ -9,11 +9,11 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Events\Component;
|
||||
namespace CachetHQ\Cachet\Bus\Events\Component;
|
||||
|
||||
use CachetHQ\Cachet\Models\Component;
|
||||
|
||||
class ComponentWasRemovedEvent
|
||||
final class ComponentWasRemovedEvent implements ComponentEventInterface
|
||||
{
|
||||
/**
|
||||
* The component that was removed.
|
||||
@@ -25,6 +25,8 @@ class ComponentWasRemovedEvent
|
||||
/**
|
||||
* Create a new component was removed event instance.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Models\Component $component
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Component $component)
|
||||
@@ -9,11 +9,11 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Events\Component;
|
||||
namespace CachetHQ\Cachet\Bus\Events\Component;
|
||||
|
||||
use CachetHQ\Cachet\Models\Component;
|
||||
|
||||
class ComponentWasUpdatedEvent
|
||||
final class ComponentWasUpdatedEvent implements ComponentEventInterface
|
||||
{
|
||||
/**
|
||||
* The component that was updated.
|
||||
@@ -25,6 +25,8 @@ class ComponentWasUpdatedEvent
|
||||
/**
|
||||
* Create a new component was updated event instance.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Models\Component $component
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Component $component)
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Cachet.
|
||||
*
|
||||
* (c) Alt Three Services Limited
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Bus\Events\ComponentGroup;
|
||||
|
||||
use CachetHQ\Cachet\Bus\Events\EventInterface;
|
||||
|
||||
interface ComponentGroupEventInterface extends EventInterface
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -9,11 +9,11 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Events\ComponentGroup;
|
||||
namespace CachetHQ\Cachet\Bus\Events\ComponentGroup;
|
||||
|
||||
use CachetHQ\Cachet\Models\ComponentGroup;
|
||||
|
||||
class ComponentGroupWasAddedEvent
|
||||
final class ComponentGroupWasAddedEvent implements ComponentGroupEventInterface
|
||||
{
|
||||
/**
|
||||
* The component group that was added.
|
||||
@@ -25,6 +25,8 @@ class ComponentGroupWasAddedEvent
|
||||
/**
|
||||
* Create a new component group was added event instance.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Models\ComponentGroup $group
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(ComponentGroup $group)
|
||||
@@ -9,11 +9,11 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Events\ComponentGroup;
|
||||
namespace CachetHQ\Cachet\Bus\Events\ComponentGroup;
|
||||
|
||||
use CachetHQ\Cachet\Models\ComponentGroup;
|
||||
|
||||
class ComponentGroupWasRemovedEvent
|
||||
final class ComponentGroupWasRemovedEvent implements ComponentGroupEventInterface
|
||||
{
|
||||
/**
|
||||
* The component group that was removed.
|
||||
@@ -25,6 +25,8 @@ class ComponentGroupWasRemovedEvent
|
||||
/**
|
||||
* Create a new component group was removed event instance.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Models\ComponentGroup $group
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(ComponentGroup $group)
|
||||
@@ -9,11 +9,11 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Events\ComponentGroup;
|
||||
namespace CachetHQ\Cachet\Bus\Events\ComponentGroup;
|
||||
|
||||
use CachetHQ\Cachet\Models\ComponentGroup;
|
||||
|
||||
class ComponentGroupWasUpdatedEvent
|
||||
final class ComponentGroupWasUpdatedEvent implements ComponentGroupEventInterface
|
||||
{
|
||||
/**
|
||||
* The component group that was updated.
|
||||
@@ -25,6 +25,8 @@ class ComponentGroupWasUpdatedEvent
|
||||
/**
|
||||
* Create a new component group was updated event instance.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Models\ComponentGroup $group
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(ComponentGroup $group)
|
||||
@@ -9,9 +9,9 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Events\User;
|
||||
namespace CachetHQ\Cachet\Bus\Events;
|
||||
|
||||
interface UserEventInterface
|
||||
interface EventInterface
|
||||
{
|
||||
//
|
||||
}
|
||||
19
app/Bus/Events/Incident/IncidentEventInterface.php
Normal file
19
app/Bus/Events/Incident/IncidentEventInterface.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Cachet.
|
||||
*
|
||||
* (c) Alt Three Services Limited
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Bus\Events\Incident;
|
||||
|
||||
use CachetHQ\Cachet\Bus\Events\EventInterface;
|
||||
|
||||
interface IncidentEventInterface extends EventInterface
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -9,11 +9,11 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Events\Incident;
|
||||
namespace CachetHQ\Cachet\Bus\Events\Incident;
|
||||
|
||||
use CachetHQ\Cachet\Models\Incident;
|
||||
|
||||
class IncidentWasRemovedEvent
|
||||
final class IncidentWasRemovedEvent implements IncidentEventInterface
|
||||
{
|
||||
/**
|
||||
* The incident that has been removed.
|
||||
@@ -24,6 +24,10 @@ class IncidentWasRemovedEvent
|
||||
|
||||
/**
|
||||
* Create a new incident was removed event instance.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Models\Incident $incident
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Incident $incident)
|
||||
{
|
||||
@@ -9,11 +9,11 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Events\Incident;
|
||||
namespace CachetHQ\Cachet\Bus\Events\Incident;
|
||||
|
||||
use CachetHQ\Cachet\Models\Incident;
|
||||
|
||||
class IncidentWasReportedEvent
|
||||
final class IncidentWasReportedEvent implements IncidentEventInterface
|
||||
{
|
||||
/**
|
||||
* The incident that has been reported.
|
||||
@@ -25,6 +25,8 @@ class IncidentWasReportedEvent
|
||||
/**
|
||||
* Create a new incident has reported event instance.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Models\Incident $incident
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Incident $incident)
|
||||
@@ -9,11 +9,11 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Events\Incident;
|
||||
namespace CachetHQ\Cachet\Bus\Events\Incident;
|
||||
|
||||
use CachetHQ\Cachet\Models\Incident;
|
||||
|
||||
class IncidentWasUpdatedEvent
|
||||
final class IncidentWasUpdatedEvent implements IncidentEventInterface
|
||||
{
|
||||
/**
|
||||
* The incident that has been updated.
|
||||
@@ -25,6 +25,8 @@ class IncidentWasUpdatedEvent
|
||||
/**
|
||||
* Create a new incident has updated event instance.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Models\Incident $incident
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Incident $incident)
|
||||
@@ -9,11 +9,11 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Events\Incident;
|
||||
namespace CachetHQ\Cachet\Bus\Events\Incident;
|
||||
|
||||
use CachetHQ\Cachet\Models\Incident;
|
||||
|
||||
class MaintenanceWasScheduledEvent
|
||||
final class MaintenanceWasScheduledEvent implements IncidentEventInterface
|
||||
{
|
||||
/**
|
||||
* The incident that has been reported.
|
||||
@@ -25,6 +25,8 @@ class MaintenanceWasScheduledEvent
|
||||
/**
|
||||
* Create a new maintenance has scheduled event instance.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Models\Incident $incident
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Incident $incident)
|
||||
19
app/Bus/Events/Invite/InviteEventInterface.php
Normal file
19
app/Bus/Events/Invite/InviteEventInterface.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Cachet.
|
||||
*
|
||||
* (c) Alt Three Services Limited
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Bus\Events\Invite;
|
||||
|
||||
use CachetHQ\Cachet\Bus\Events\EventInterface;
|
||||
|
||||
interface InviteEventInterface extends EventInterface
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -9,11 +9,11 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Events\Invite;
|
||||
namespace CachetHQ\Cachet\Bus\Events\Invite;
|
||||
|
||||
use CachetHQ\Cachet\Models\Invite;
|
||||
|
||||
final class InviteWasClaimed
|
||||
final class InviteWasClaimedEvent implements InviteEventInterface
|
||||
{
|
||||
/**
|
||||
* The invite that has been claimed.
|
||||
19
app/Bus/Events/Metric/MetricEventInterface.php
Normal file
19
app/Bus/Events/Metric/MetricEventInterface.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Cachet.
|
||||
*
|
||||
* (c) Alt Three Services Limited
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Bus\Events\Metric;
|
||||
|
||||
use CachetHQ\Cachet\Bus\Events\EventInterface;
|
||||
|
||||
interface MetricEventInterface extends EventInterface
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -9,26 +9,28 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Events\Metric;
|
||||
namespace CachetHQ\Cachet\Bus\Events\Metric;
|
||||
|
||||
use CachetHQ\Cachet\Models\MetricPoint;
|
||||
|
||||
class MetricPointWasAddedEvent
|
||||
final class MetricPointWasAddedEvent implements MetricEventInterface
|
||||
{
|
||||
/**
|
||||
* The metric point that was added.
|
||||
*
|
||||
* @var \CachetHQ\Cachet\Models\MetricPoint
|
||||
*/
|
||||
public $metric;
|
||||
public $metricPoint;
|
||||
|
||||
/**
|
||||
* Create a new metric point was added event instance.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Models\MetricPoint $metricPoint
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(MetricPoint $metric)
|
||||
public function __construct(MetricPoint $metricPoint)
|
||||
{
|
||||
$this->metric = $metric;
|
||||
$this->metricPoint = $metricPoint;
|
||||
}
|
||||
}
|
||||
@@ -9,11 +9,11 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Events\Metric;
|
||||
namespace CachetHQ\Cachet\Bus\Events\Metric;
|
||||
|
||||
use CachetHQ\Cachet\Models\MetricPoint;
|
||||
|
||||
class MetricPointWasRemovedEvent
|
||||
final class MetricPointWasRemovedEvent implements MetricEventInterface
|
||||
{
|
||||
/**
|
||||
* The metric point that was removed.
|
||||
@@ -25,6 +25,8 @@ class MetricPointWasRemovedEvent
|
||||
/**
|
||||
* Create a new metric point was removed event instance.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Models\MetricPoint $memtricPoint
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(MetricPoint $metricPoint)
|
||||
@@ -9,26 +9,28 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Events\Metric;
|
||||
namespace CachetHQ\Cachet\Bus\Events\Metric;
|
||||
|
||||
use CachetHQ\Cachet\Models\MetricPoint;
|
||||
|
||||
class MetricPointWasUpdatedEvent
|
||||
final class MetricPointWasUpdatedEvent implements MetricEventInterface
|
||||
{
|
||||
/**
|
||||
* The metric point that was updated.
|
||||
*
|
||||
* @var \CachetHQ\Cachet\Models\MetricPoint
|
||||
*/
|
||||
public $point;
|
||||
public $metricPoint;
|
||||
|
||||
/**
|
||||
* Create a new metric point was updated event instance.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Models\MetricPoint $metricPoint
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(MetricPoint $point)
|
||||
public function __construct(MetricPoint $metricPoint)
|
||||
{
|
||||
$this->point = $point;
|
||||
$this->metricPoint = $metricPoint;
|
||||
}
|
||||
}
|
||||
@@ -9,11 +9,11 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Events\Metric;
|
||||
namespace CachetHQ\Cachet\Bus\Events\Metric;
|
||||
|
||||
use CachetHQ\Cachet\Models\Metric;
|
||||
|
||||
class MetricWasAddedEvent
|
||||
final class MetricWasAddedEvent implements MetricEventInterface
|
||||
{
|
||||
/**
|
||||
* The metric that was added.
|
||||
@@ -25,6 +25,8 @@ class MetricWasAddedEvent
|
||||
/**
|
||||
* Create a new metric was added event instance.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Models\Metric $metric
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Metric $metric)
|
||||
@@ -9,11 +9,11 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Events\Metric;
|
||||
namespace CachetHQ\Cachet\Bus\Events\Metric;
|
||||
|
||||
use CachetHQ\Cachet\Models\Metric;
|
||||
|
||||
class MetricWasRemovedEvent
|
||||
final class MetricWasRemovedEvent implements MetricEventInterface
|
||||
{
|
||||
/**
|
||||
* The metric that was removed.
|
||||
@@ -25,6 +25,8 @@ class MetricWasRemovedEvent
|
||||
/**
|
||||
* Create a new metric was removed event instance.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Models\Metric $metric
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Metric $metric)
|
||||
@@ -9,11 +9,11 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Events\Metric;
|
||||
namespace CachetHQ\Cachet\Bus\Events\Metric;
|
||||
|
||||
use CachetHQ\Cachet\Models\Metric;
|
||||
|
||||
class MetricWasUpdatedEvent
|
||||
final class MetricWasUpdatedEvent implements MetricEventInterface
|
||||
{
|
||||
/**
|
||||
* The metric that was updated.
|
||||
@@ -25,6 +25,8 @@ class MetricWasUpdatedEvent
|
||||
/**
|
||||
* Create a new metric was updated event instance.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Models\Metric $metric
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Metric $metric)
|
||||
19
app/Bus/Events/Subscriber/SubscriberEventInterface.php
Normal file
19
app/Bus/Events/Subscriber/SubscriberEventInterface.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Cachet.
|
||||
*
|
||||
* (c) Alt Three Services Limited
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Bus\Events\Subscriber;
|
||||
|
||||
use CachetHQ\Cachet\Bus\Events\EventInterface;
|
||||
|
||||
interface SubscriberEventInterface extends EventInterface
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -9,11 +9,11 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Events\Subscriber;
|
||||
namespace CachetHQ\Cachet\Bus\Events\Subscriber;
|
||||
|
||||
use CachetHQ\Cachet\Models\Subscriber;
|
||||
|
||||
class SubscriberHasSubscribedEvent
|
||||
final class SubscriberHasSubscribedEvent implements SubscriberEventInterface
|
||||
{
|
||||
/**
|
||||
* The subscriber who has subscribed.
|
||||
@@ -25,6 +25,8 @@ class SubscriberHasSubscribedEvent
|
||||
/**
|
||||
* Create a new subscriber has subscribed event instance.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Models\Subscriber $subscriber
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Subscriber $subscriber)
|
||||
@@ -9,11 +9,11 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Events\Subscriber;
|
||||
namespace CachetHQ\Cachet\Bus\Events\Subscriber;
|
||||
|
||||
use CachetHQ\Cachet\Models\Subscriber;
|
||||
|
||||
class SubscriberHasUnsubscribedEvent
|
||||
final class SubscriberHasUnsubscribedEvent implements SubscriberEventInterface
|
||||
{
|
||||
/**
|
||||
* The subscriber who has unsubscribed.
|
||||
@@ -25,6 +25,8 @@ class SubscriberHasUnsubscribedEvent
|
||||
/**
|
||||
* Create a new subscriber has unsubscribed event instance.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Models\Subscriber $subscriber
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Subscriber $subscriber)
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Cachet.
|
||||
*
|
||||
* (c) Alt Three Services Limited
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Bus\Events\Subscriber;
|
||||
|
||||
use CachetHQ\Cachet\Models\Subscriber;
|
||||
|
||||
/**
|
||||
* This is the subscriber has updated subscriptions event.
|
||||
*
|
||||
* @author James Brooks <james@alt-three.com>
|
||||
*/
|
||||
final class SubscriberHasUpdatedSubscriptionsEvent implements SubscriberEventInterface
|
||||
{
|
||||
/**
|
||||
* The subscriber.
|
||||
*
|
||||
* @var \CachetHQ\Cachet\Models\Subscriber
|
||||
*/
|
||||
public $subscriber;
|
||||
|
||||
/**
|
||||
* Create a new subscriber has updated subscriptions event instance.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Models\Subscriber $subscriber
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Subscriber $subscriber)
|
||||
{
|
||||
$this->subscriber = $subscriber;
|
||||
}
|
||||
}
|
||||
@@ -9,11 +9,11 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Events\Subscriber;
|
||||
namespace CachetHQ\Cachet\Bus\Events\Subscriber;
|
||||
|
||||
use CachetHQ\Cachet\Models\Subscriber;
|
||||
|
||||
class SubscriberHasVerifiedEvent
|
||||
final class SubscriberHasVerifiedEvent implements SubscriberEventInterface
|
||||
{
|
||||
/**
|
||||
* The subscriber who has verified.
|
||||
@@ -25,6 +25,8 @@ class SubscriberHasVerifiedEvent
|
||||
/**
|
||||
* Create a new subscriber has subscribed event instance.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Models\Subscriber $subscriber
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Subscriber $subscriber)
|
||||
19
app/Bus/Events/User/UserEventInterface.php
Normal file
19
app/Bus/Events/User/UserEventInterface.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Cachet.
|
||||
*
|
||||
* (c) Alt Three Services Limited
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Bus\Events\User;
|
||||
|
||||
use CachetHQ\Cachet\Bus\Events\EventInterface;
|
||||
|
||||
interface UserEventInterface extends EventInterface
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -9,7 +9,7 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Events\User;
|
||||
namespace CachetHQ\Cachet\Bus\Events\User;
|
||||
|
||||
use CachetHQ\Cachet\Models\User;
|
||||
|
||||
@@ -25,6 +25,8 @@ final class UserWasAddedEvent implements UserEventInterface
|
||||
/**
|
||||
* Create a new user was added event instance.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Models\User $user
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(User $user)
|
||||
@@ -9,11 +9,11 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Events\User;
|
||||
namespace CachetHQ\Cachet\Bus\Events\User;
|
||||
|
||||
use CachetHQ\Cachet\Models\Invite;
|
||||
|
||||
final class UserWasInvitedEvent
|
||||
final class UserWasInvitedEvent implements UserEventInterface
|
||||
{
|
||||
/**
|
||||
* The invite that has been added.
|
||||
@@ -25,6 +25,8 @@ final class UserWasInvitedEvent
|
||||
/**
|
||||
* Create a new user was invite event instance.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Models\Invite $invite
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Invite $invite)
|
||||
@@ -9,7 +9,7 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Events\User;
|
||||
namespace CachetHQ\Cachet\Bus\Events\User;
|
||||
|
||||
use CachetHQ\Cachet\Models\User;
|
||||
|
||||
@@ -25,6 +25,8 @@ final class UserWasRemovedEvent implements UserEventInterface
|
||||
/**
|
||||
* Create a new user was removed event instance.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Models\User $user
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(User $user)
|
||||
23
app/Bus/Exceptions/ExceptionInterface.php
Normal file
23
app/Bus/Exceptions/ExceptionInterface.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Cachet.
|
||||
*
|
||||
* (c) Alt Three Services Limited
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Bus\Exceptions;
|
||||
|
||||
/**
|
||||
* This is the exception interface.
|
||||
*
|
||||
* @author Graham Campbell <graham@alt-three.com>
|
||||
* @author James Brooks <james@alt-three.com>
|
||||
*/
|
||||
interface ExceptionInterface
|
||||
{
|
||||
//
|
||||
}
|
||||
26
app/Bus/Exceptions/Subscriber/AlreadySubscribedException.php
Normal file
26
app/Bus/Exceptions/Subscriber/AlreadySubscribedException.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Cachet.
|
||||
*
|
||||
* (c) Alt Three Services Limited
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Bus\Exceptions\Subscriber;
|
||||
|
||||
use CachetHQ\Cachet\Bus\Exceptions\ExceptionInterface;
|
||||
use Exception;
|
||||
|
||||
/**
|
||||
* This is the already subscribed exception class.
|
||||
*
|
||||
* @author Graham Campbell <graham@alt-three.com>
|
||||
* @author James Brooks <james@alt-three.com>
|
||||
*/
|
||||
class AlreadySubscribedException extends Exception implements ExceptionInterface
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -9,10 +9,10 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Handlers\Commands\Component;
|
||||
namespace CachetHQ\Cachet\Bus\Handlers\Commands\Component;
|
||||
|
||||
use CachetHQ\Cachet\Commands\Component\AddComponentCommand;
|
||||
use CachetHQ\Cachet\Events\Component\ComponentWasAddedEvent;
|
||||
use CachetHQ\Cachet\Bus\Commands\Component\AddComponentCommand;
|
||||
use CachetHQ\Cachet\Bus\Events\Component\ComponentWasAddedEvent;
|
||||
use CachetHQ\Cachet\Models\Component;
|
||||
|
||||
class AddComponentCommandHandler
|
||||
@@ -20,7 +20,7 @@ class AddComponentCommandHandler
|
||||
/**
|
||||
* Handle the add component command.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Commands\Component\AddComponentCommand $command
|
||||
* @param \CachetHQ\Cachet\Bus\Commands\Component\AddComponentCommand $command
|
||||
*
|
||||
* @return \CachetHQ\Cachet\Models\Component
|
||||
*/
|
||||
@@ -36,7 +36,7 @@ class AddComponentCommandHandler
|
||||
/**
|
||||
* Filter the command data.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Commands\Incident\AddComponentCommand $command
|
||||
* @param \CachetHQ\Cachet\Bus\Commands\Incident\AddComponentCommand $command
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
@@ -9,17 +9,17 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Handlers\Commands\Component;
|
||||
namespace CachetHQ\Cachet\Bus\Handlers\Commands\Component;
|
||||
|
||||
use CachetHQ\Cachet\Commands\Component\RemoveComponentCommand;
|
||||
use CachetHQ\Cachet\Events\Component\ComponentWasRemovedEvent;
|
||||
use CachetHQ\Cachet\Bus\Commands\Component\RemoveComponentCommand;
|
||||
use CachetHQ\Cachet\Bus\Events\Component\ComponentWasRemovedEvent;
|
||||
|
||||
class RemoveComponentCommandHandler
|
||||
{
|
||||
/**
|
||||
* Handle the remove component command.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Commands\Component\RemoveComponentCommand $command
|
||||
* @param \CachetHQ\Cachet\Bus\Commands\Component\RemoveComponentCommand $command
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@@ -9,10 +9,10 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Handlers\Commands\Component;
|
||||
namespace CachetHQ\Cachet\Bus\Handlers\Commands\Component;
|
||||
|
||||
use CachetHQ\Cachet\Commands\Component\UpdateComponentCommand;
|
||||
use CachetHQ\Cachet\Events\Component\ComponentWasUpdatedEvent;
|
||||
use CachetHQ\Cachet\Bus\Commands\Component\UpdateComponentCommand;
|
||||
use CachetHQ\Cachet\Bus\Events\Component\ComponentWasUpdatedEvent;
|
||||
use CachetHQ\Cachet\Models\Component;
|
||||
|
||||
class UpdateComponentCommandHandler
|
||||
@@ -20,7 +20,7 @@ class UpdateComponentCommandHandler
|
||||
/**
|
||||
* Handle the update component command.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Commands\Component\UpdateComponentCommand $command
|
||||
* @param \CachetHQ\Cachet\Bus\Commands\Component\UpdateComponentCommand $command
|
||||
*
|
||||
* @return \CachetHQ\Cachet\Models\Component
|
||||
*/
|
||||
@@ -38,7 +38,7 @@ class UpdateComponentCommandHandler
|
||||
/**
|
||||
* Filter the command data.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Commands\Incident\UpdateComponentCommand $command
|
||||
* @param \CachetHQ\Cachet\Bus\Commands\Incident\UpdateComponentCommand $command
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
@@ -9,10 +9,10 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Handlers\Commands\ComponentGroup;
|
||||
namespace CachetHQ\Cachet\Bus\Handlers\Commands\ComponentGroup;
|
||||
|
||||
use CachetHQ\Cachet\Commands\ComponentGroup\AddComponentGroupCommand;
|
||||
use CachetHQ\Cachet\Events\ComponentGroup\ComponentGroupWasAddedEvent;
|
||||
use CachetHQ\Cachet\Bus\Commands\ComponentGroup\AddComponentGroupCommand;
|
||||
use CachetHQ\Cachet\Bus\Events\ComponentGroup\ComponentGroupWasAddedEvent;
|
||||
use CachetHQ\Cachet\Models\ComponentGroup;
|
||||
|
||||
class AddComponentGroupCommandHandler
|
||||
@@ -20,15 +20,16 @@ class AddComponentGroupCommandHandler
|
||||
/**
|
||||
* Handle the add component group command.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Commands\ComponentGroup\AddComponentGroupCommand $command
|
||||
* @param \CachetHQ\Cachet\Bus\Commands\ComponentGroup\AddComponentGroupCommand $command
|
||||
*
|
||||
* @return \CachetHQ\Cachet\Models\ComponentGroup
|
||||
*/
|
||||
public function handle(AddComponentGroupCommand $command)
|
||||
{
|
||||
$group = ComponentGroup::create([
|
||||
'name' => $command->name,
|
||||
'order' => $command->order,
|
||||
'name' => $command->name,
|
||||
'order' => $command->order,
|
||||
'collapsed' => $command->collapsed,
|
||||
]);
|
||||
|
||||
event(new ComponentGroupWasAddedEvent($group));
|
||||
@@ -9,17 +9,17 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Handlers\Commands\ComponentGroup;
|
||||
namespace CachetHQ\Cachet\Bus\Handlers\Commands\ComponentGroup;
|
||||
|
||||
use CachetHQ\Cachet\Commands\ComponentGroup\RemoveComponentGroupCommand;
|
||||
use CachetHQ\Cachet\Events\ComponentGroup\ComponentGroupWasRemovedEvent;
|
||||
use CachetHQ\Cachet\Bus\Commands\ComponentGroup\RemoveComponentGroupCommand;
|
||||
use CachetHQ\Cachet\Bus\Events\ComponentGroup\ComponentGroupWasRemovedEvent;
|
||||
|
||||
class RemoveComponentGroupCommandHandler
|
||||
{
|
||||
/**
|
||||
* Handle the remove component group command.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Commands\ComponentGroup\RemoveComponentGroupCommand $command
|
||||
* @param \CachetHQ\Cachet\Bus\Commands\ComponentGroup\RemoveComponentGroupCommand $command
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Cachet.
|
||||
*
|
||||
* (c) Alt Three Services Limited
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Bus\Handlers\Commands\ComponentGroup;
|
||||
|
||||
use CachetHQ\Cachet\Bus\Commands\ComponentGroup\UpdateComponentGroupCommand;
|
||||
use CachetHQ\Cachet\Bus\Events\ComponentGroup\ComponentGroupWasUpdatedEvent;
|
||||
|
||||
class UpdateComponentGroupCommandHandler
|
||||
{
|
||||
/**
|
||||
* Handle the update component group command.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Bus\Commands\ComponentGroup\UpdateComponentGroupCommand $command
|
||||
*
|
||||
* @return \CachetHQ\Cachet\Models\ComponentGroup
|
||||
*/
|
||||
public function handle(UpdateComponentGroupCommand $command)
|
||||
{
|
||||
$group = $command->group;
|
||||
$group->update($this->filter($command));
|
||||
|
||||
event(new ComponentGroupWasUpdatedEvent($group));
|
||||
|
||||
return $group;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the command data.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Bus\Commands\ComponentGroup\UpdateComponentGroupCommand $command
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function filter(UpdateComponentGroupCommand $command)
|
||||
{
|
||||
$params = [
|
||||
'name' => $command->name,
|
||||
'order' => $command->order,
|
||||
'collapsed' => $command->collapsed,
|
||||
];
|
||||
|
||||
return array_filter($params, function ($val) {
|
||||
return $val !== null;
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -9,17 +9,17 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Handlers\Commands\Incident;
|
||||
namespace CachetHQ\Cachet\Bus\Handlers\Commands\Incident;
|
||||
|
||||
use CachetHQ\Cachet\Commands\Incident\RemoveIncidentCommand;
|
||||
use CachetHQ\Cachet\Events\Incident\IncidentWasRemovedEvent;
|
||||
use CachetHQ\Cachet\Bus\Commands\Incident\RemoveIncidentCommand;
|
||||
use CachetHQ\Cachet\Bus\Events\Incident\IncidentWasRemovedEvent;
|
||||
|
||||
class RemoveIncidentCommandHandler
|
||||
{
|
||||
/**
|
||||
* Handle the remove incident command.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Commands\Incident\RemoveIncidentCommand $command
|
||||
* @param \CachetHQ\Cachet\Bus\Commands\Incident\RemoveIncidentCommand $command
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@@ -9,17 +9,22 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Handlers\Commands\Incident;
|
||||
namespace CachetHQ\Cachet\Bus\Handlers\Commands\Incident;
|
||||
|
||||
use CachetHQ\Cachet\Commands\Incident\ReportIncidentCommand;
|
||||
use CachetHQ\Cachet\Bus\Commands\Incident\ReportIncidentCommand;
|
||||
use CachetHQ\Cachet\Bus\Events\Incident\IncidentWasReportedEvent;
|
||||
use CachetHQ\Cachet\Dates\DateFactory;
|
||||
use CachetHQ\Cachet\Events\Incident\IncidentWasReportedEvent;
|
||||
use CachetHQ\Cachet\Models\Component;
|
||||
use CachetHQ\Cachet\Models\Incident;
|
||||
use CachetHQ\Cachet\Models\IncidentTemplate;
|
||||
use Twig_Loader_String;
|
||||
use TwigBridge\Facade\Twig;
|
||||
use TwigBridge\Bridge;
|
||||
|
||||
/**
|
||||
* This is the report incident command handler.
|
||||
*
|
||||
* @author James Brooks <james@alt-three.com>
|
||||
*/
|
||||
class ReportIncidentCommandHandler
|
||||
{
|
||||
/**
|
||||
@@ -29,38 +34,48 @@ class ReportIncidentCommandHandler
|
||||
*/
|
||||
protected $dates;
|
||||
|
||||
/**
|
||||
* The twig bridge instance.
|
||||
*
|
||||
* @var \TwigBridge\Bridge
|
||||
*/
|
||||
protected $twig;
|
||||
|
||||
/**
|
||||
* Create a new report incident command handler instance.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Dates\DateFactory $dates
|
||||
* @param \TwigBridge\Bridge $twig
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(DateFactory $dates)
|
||||
public function __construct(DateFactory $dates, Bridge $twig)
|
||||
{
|
||||
$this->dates = $dates;
|
||||
$this->twig = $twig;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the report incident command.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Commands\Incident\ReportIncidentCommand $command
|
||||
* @param \CachetHQ\Cachet\Bus\Commands\Incident\ReportIncidentCommand $command
|
||||
*
|
||||
* @return \CachetHQ\Cachet\Models\Incident
|
||||
*/
|
||||
public function handle(ReportIncidentCommand $command)
|
||||
{
|
||||
if ($command->template) {
|
||||
$command->message = $this->parseIncidentTemplate($command->template, $command->template_vars);
|
||||
}
|
||||
|
||||
$data = [
|
||||
'name' => $command->name,
|
||||
'status' => $command->status,
|
||||
'message' => $command->message,
|
||||
'visible' => $command->visible,
|
||||
];
|
||||
|
||||
if ($command->template) {
|
||||
$data['message'] = $this->parseIncidentTemplate($command->template, $command->template_vars);
|
||||
} else {
|
||||
$data['message'] = $command->message;
|
||||
}
|
||||
|
||||
// Link with the component.
|
||||
if ($command->component_id) {
|
||||
$data['component_id'] = $command->component_id;
|
||||
@@ -68,7 +83,7 @@ class ReportIncidentCommandHandler
|
||||
|
||||
// The incident occurred at a different time.
|
||||
if ($command->incident_date) {
|
||||
$incidentDate = $this->dates->createNormalized('d/m/Y H:i', $command->incident_date);
|
||||
$incidentDate = $this->dates->create('d/m/Y H:i', $command->incident_date);
|
||||
|
||||
$data['created_at'] = $incidentDate;
|
||||
$data['updated_at'] = $incidentDate;
|
||||
@@ -101,9 +116,13 @@ class ReportIncidentCommandHandler
|
||||
*/
|
||||
protected function parseIncidentTemplate($templateSlug, $vars)
|
||||
{
|
||||
Twig::setLoader(new Twig_Loader_String());
|
||||
if ($vars === null) {
|
||||
$vars = [];
|
||||
}
|
||||
|
||||
$this->twig->setLoader(new Twig_Loader_String());
|
||||
$template = IncidentTemplate::forSlug($templateSlug)->first();
|
||||
|
||||
return Twig::render($template->template, $vars);
|
||||
return $this->twig->render($template->template, $vars);
|
||||
}
|
||||
}
|
||||
@@ -9,11 +9,11 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Handlers\Commands\Incident;
|
||||
namespace CachetHQ\Cachet\Bus\Handlers\Commands\Incident;
|
||||
|
||||
use CachetHQ\Cachet\Commands\Incident\ReportMaintenanceCommand;
|
||||
use CachetHQ\Cachet\Bus\Commands\Incident\ReportMaintenanceCommand;
|
||||
use CachetHQ\Cachet\Bus\Events\Incident\MaintenanceWasScheduledEvent;
|
||||
use CachetHQ\Cachet\Dates\DateFactory;
|
||||
use CachetHQ\Cachet\Events\Incident\MaintenanceWasScheduledEvent;
|
||||
use CachetHQ\Cachet\Models\Incident;
|
||||
|
||||
class ReportMaintenanceCommandHandler
|
||||
@@ -26,7 +26,7 @@ class ReportMaintenanceCommandHandler
|
||||
protected $dates;
|
||||
|
||||
/**
|
||||
* Create a new report maintanance command handler instance.
|
||||
* Create a new report maintenance command handler instance.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Dates\DateFactory $dates
|
||||
*
|
||||
@@ -40,13 +40,13 @@ class ReportMaintenanceCommandHandler
|
||||
/**
|
||||
* Handle the report maintenance command.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Commands\Incident\ReportMaintenanceCommand $command
|
||||
* @param \CachetHQ\Cachet\Bus\Commands\Incident\ReportMaintenanceCommand $command
|
||||
*
|
||||
* @return \CachetHQ\Cachet\Models\Incident
|
||||
*/
|
||||
public function handle(ReportMaintenanceCommand $command)
|
||||
{
|
||||
$scheduledAt = $this->dates->createNormalized('d/m/Y H:i', $command->timestamp);
|
||||
$scheduledAt = $this->dates->create('d/m/Y H:i', $command->timestamp);
|
||||
|
||||
$maintenanceEvent = Incident::create([
|
||||
'name' => $command->name,
|
||||
@@ -9,17 +9,22 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Handlers\Commands\Incident;
|
||||
namespace CachetHQ\Cachet\Bus\Handlers\Commands\Incident;
|
||||
|
||||
use CachetHQ\Cachet\Commands\Incident\UpdateIncidentCommand;
|
||||
use CachetHQ\Cachet\Bus\Commands\Incident\UpdateIncidentCommand;
|
||||
use CachetHQ\Cachet\Bus\Events\Incident\IncidentWasUpdatedEvent;
|
||||
use CachetHQ\Cachet\Dates\DateFactory;
|
||||
use CachetHQ\Cachet\Events\Incident\IncidentWasUpdatedEvent;
|
||||
use CachetHQ\Cachet\Models\Component;
|
||||
use CachetHQ\Cachet\Models\Incident;
|
||||
use CachetHQ\Cachet\Models\IncidentTemplate;
|
||||
use Twig_Loader_String;
|
||||
use TwigBridge\Facade\Twig;
|
||||
use TwigBridge\Bridge;
|
||||
|
||||
/**
|
||||
* This is the update incident command handler.
|
||||
*
|
||||
* @author James Brooks <james@alt-three.com>
|
||||
*/
|
||||
class UpdateIncidentCommandHandler
|
||||
{
|
||||
/**
|
||||
@@ -29,22 +34,31 @@ class UpdateIncidentCommandHandler
|
||||
*/
|
||||
protected $dates;
|
||||
|
||||
/**
|
||||
* The twig bridge instance.
|
||||
*
|
||||
* @var \TwigBridge\Bridge
|
||||
*/
|
||||
protected $twig;
|
||||
|
||||
/**
|
||||
* Create a new update incident command handler instance.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Dates\DateFactory $dates
|
||||
* @param \TwigBridge\Bridge $twig
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(DateFactory $dates)
|
||||
public function __construct(DateFactory $dates, Bridge $twig)
|
||||
{
|
||||
$this->dates = $dates;
|
||||
$this->twig = $twig;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the update incident command.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Commands\Incident\UpdateIncidentCommand $command
|
||||
* @param \CachetHQ\Cachet\Bus\Commands\Incident\UpdateIncidentCommand $command
|
||||
*
|
||||
* @return \CachetHQ\Cachet\Models\Incident
|
||||
*/
|
||||
@@ -59,7 +73,7 @@ class UpdateIncidentCommandHandler
|
||||
|
||||
// The incident occurred at a different time.
|
||||
if ($command->incident_date) {
|
||||
$incidentDate = $this->dates->createNormalized('d/m/Y H:i', $command->incident_date);
|
||||
$incidentDate = $this->dates->create('d/m/Y H:i', $command->incident_date);
|
||||
|
||||
$incident->update([
|
||||
'created_at' => $incidentDate,
|
||||
@@ -82,7 +96,7 @@ class UpdateIncidentCommandHandler
|
||||
/**
|
||||
* Filter the command data.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Commands\Incident\UpdateIncidentCommand $command
|
||||
* @param \CachetHQ\Cachet\Bus\Commands\Incident\UpdateIncidentCommand $command
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
@@ -113,9 +127,9 @@ class UpdateIncidentCommandHandler
|
||||
*/
|
||||
protected function parseIncidentTemplate($templateSlug, $vars)
|
||||
{
|
||||
Twig::setLoader(new Twig_Loader_String());
|
||||
$this->twig->setLoader(new Twig_Loader_String());
|
||||
$template = IncidentTemplate::forSlug($templateSlug)->first();
|
||||
|
||||
return Twig::render($template->template, $vars);
|
||||
return $this->twig->render($template->template, $vars);
|
||||
}
|
||||
}
|
||||
@@ -9,10 +9,10 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Handlers\Commands\Invite;
|
||||
namespace CachetHQ\Cachet\Bus\Handlers\Commands\Invite;
|
||||
|
||||
use CachetHQ\Cachet\Commands\Invite\ClaimInviteCommand;
|
||||
use CachetHQ\Cachet\Events\Invite\InviteWasClaimed;
|
||||
use CachetHQ\Cachet\Bus\Commands\Invite\ClaimInviteCommand;
|
||||
use CachetHQ\Cachet\Bus\Events\Invite\InviteWasClaimedEvent;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class ClaimInviteCommandHandler
|
||||
@@ -20,7 +20,7 @@ class ClaimInviteCommandHandler
|
||||
/**
|
||||
* Handle the claim invite command.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Commands\User\ClaimInviteCommand $command
|
||||
* @param \CachetHQ\Cachet\Bus\Commands\User\ClaimInviteCommand $command
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@@ -31,6 +31,6 @@ class ClaimInviteCommandHandler
|
||||
$invite->claimed_at = Carbon::now();
|
||||
$invite->save();
|
||||
|
||||
event(new InviteWasClaimed($invite));
|
||||
event(new InviteWasClaimedEvent($invite));
|
||||
}
|
||||
}
|
||||
@@ -9,10 +9,10 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Handlers\Commands\Metric;
|
||||
namespace CachetHQ\Cachet\Bus\Handlers\Commands\Metric;
|
||||
|
||||
use CachetHQ\Cachet\Commands\Metric\AddMetricCommand;
|
||||
use CachetHQ\Cachet\Events\Metric\MetricWasAddedEvent;
|
||||
use CachetHQ\Cachet\Bus\Commands\Metric\AddMetricCommand;
|
||||
use CachetHQ\Cachet\Bus\Events\Metric\MetricWasAddedEvent;
|
||||
use CachetHQ\Cachet\Models\Metric;
|
||||
|
||||
class AddMetricCommandHandler
|
||||
@@ -20,7 +20,7 @@ class AddMetricCommandHandler
|
||||
/**
|
||||
* Handle the add metric command.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Commands\Metric\AddMetricCommand $command
|
||||
* @param \CachetHQ\Cachet\Bus\Commands\Metric\AddMetricCommand $command
|
||||
*
|
||||
* @return \CachetHQ\Cachet\Models\Metric
|
||||
*/
|
||||
@@ -34,6 +34,7 @@ class AddMetricCommandHandler
|
||||
'calc_type' => $command->calc_type,
|
||||
'display_chart' => $command->display_chart,
|
||||
'places' => $command->places,
|
||||
'default_view' => $command->default_view,
|
||||
]);
|
||||
|
||||
event(new MetricWasAddedEvent($metric));
|
||||
@@ -9,11 +9,11 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Handlers\Commands\Metric;
|
||||
namespace CachetHQ\Cachet\Bus\Handlers\Commands\Metric;
|
||||
|
||||
use CachetHQ\Cachet\Commands\Metric\AddMetricPointCommand;
|
||||
use CachetHQ\Cachet\Bus\Commands\Metric\AddMetricPointCommand;
|
||||
use CachetHQ\Cachet\Bus\Events\Metric\MetricPointWasAddedEvent;
|
||||
use CachetHQ\Cachet\Dates\DateFactory;
|
||||
use CachetHQ\Cachet\Events\Metric\MetricPointWasAddedEvent;
|
||||
use CachetHQ\Cachet\Models\MetricPoint;
|
||||
|
||||
class AddMetricPointCommandHandler
|
||||
@@ -40,7 +40,7 @@ class AddMetricPointCommandHandler
|
||||
/**
|
||||
* Handle the add metric point command.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Commands\Metric\AddMetricPointCommand $command
|
||||
* @param \CachetHQ\Cachet\Bus\Commands\Metric\AddMetricPointCommand $command
|
||||
*
|
||||
* @return \CachetHQ\Cachet\Models\MetricPoint
|
||||
*/
|
||||
@@ -9,10 +9,10 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Handlers\Commands\Metric;
|
||||
namespace CachetHQ\Cachet\Bus\Handlers\Commands\Metric;
|
||||
|
||||
use CachetHQ\Cachet\Commands\Metric\RemoveMetricCommand;
|
||||
use CachetHQ\Cachet\Events\Metric\MetricWasRemovedEvent;
|
||||
use CachetHQ\Cachet\Bus\Commands\Metric\RemoveMetricCommand;
|
||||
use CachetHQ\Cachet\Bus\Events\Metric\MetricWasRemovedEvent;
|
||||
use CachetHQ\Cachet\Models\Metric;
|
||||
|
||||
class RemoveMetricCommandHandler
|
||||
@@ -20,7 +20,7 @@ class RemoveMetricCommandHandler
|
||||
/**
|
||||
* Handle the remove metric command.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Commands\Metric\RemoveMetricCommand $command
|
||||
* @param \CachetHQ\Cachet\Bus\Commands\Metric\RemoveMetricCommand $command
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@@ -9,10 +9,10 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Handlers\Commands\Metric;
|
||||
namespace CachetHQ\Cachet\Bus\Handlers\Commands\Metric;
|
||||
|
||||
use CachetHQ\Cachet\Commands\Metric\RemoveMetricPointCommand;
|
||||
use CachetHQ\Cachet\Events\Metric\MetricPointWasRemovedEvent;
|
||||
use CachetHQ\Cachet\Bus\Commands\Metric\RemoveMetricPointCommand;
|
||||
use CachetHQ\Cachet\Bus\Events\Metric\MetricPointWasRemovedEvent;
|
||||
use CachetHQ\Cachet\Models\Metric;
|
||||
|
||||
class RemoveMetricPointCommandHandler
|
||||
@@ -20,7 +20,7 @@ class RemoveMetricPointCommandHandler
|
||||
/**
|
||||
* Handle the remove metric point command.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Commands\Metric\RemoveMetricPointCommand $command
|
||||
* @param \CachetHQ\Cachet\Bus\Commands\Metric\RemoveMetricPointCommand $command
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@@ -9,10 +9,10 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Handlers\Commands\Metric;
|
||||
namespace CachetHQ\Cachet\Bus\Handlers\Commands\Metric;
|
||||
|
||||
use CachetHQ\Cachet\Commands\Metric\UpdateMetricCommand;
|
||||
use CachetHQ\Cachet\Events\Metric\MetricWasUpdatedEvent;
|
||||
use CachetHQ\Cachet\Bus\Commands\Metric\UpdateMetricCommand;
|
||||
use CachetHQ\Cachet\Bus\Events\Metric\MetricWasUpdatedEvent;
|
||||
use CachetHQ\Cachet\Models\Metric;
|
||||
|
||||
class UpdateMetricCommandHandler
|
||||
@@ -20,7 +20,7 @@ class UpdateMetricCommandHandler
|
||||
/**
|
||||
* Handle the update metric command.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Commands\Metric\UpdateMetricCommand $command
|
||||
* @param \CachetHQ\Cachet\Bus\Commands\Metric\UpdateMetricCommand $command
|
||||
*
|
||||
* @return \CachetHQ\Cachet\Models\Metric
|
||||
*/
|
||||
@@ -38,7 +38,7 @@ class UpdateMetricCommandHandler
|
||||
/**
|
||||
* Filter the command data.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Commands\Metric\UpdateMetricCommand $command
|
||||
* @param \CachetHQ\Cachet\Bus\Commands\Metric\UpdateMetricCommand $command
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
@@ -52,6 +52,7 @@ class UpdateMetricCommandHandler
|
||||
'calc_type' => $command->calc_type,
|
||||
'display_chart' => $command->display_chart,
|
||||
'places' => $command->places,
|
||||
'default_view' => $command->default_view,
|
||||
];
|
||||
|
||||
return array_filter($params, function ($val) {
|
||||
@@ -9,11 +9,11 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Handlers\Commands\Metric;
|
||||
namespace CachetHQ\Cachet\Bus\Handlers\Commands\Metric;
|
||||
|
||||
use CachetHQ\Cachet\Commands\Metric\UpdateMetricPointCommand;
|
||||
use CachetHQ\Cachet\Bus\Commands\Metric\UpdateMetricPointCommand;
|
||||
use CachetHQ\Cachet\Bus\Events\Metric\MetricPointWasUpdatedEvent;
|
||||
use CachetHQ\Cachet\Dates\DateFactory;
|
||||
use CachetHQ\Cachet\Events\Metric\MetricPointWasUpdatedEvent;
|
||||
|
||||
class UpdateMetricPointCommandHandler
|
||||
{
|
||||
@@ -39,7 +39,7 @@ class UpdateMetricPointCommandHandler
|
||||
/**
|
||||
* Handle the update metric point command.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Commands\Metric\UpdateMetricPointCommand $command
|
||||
* @param \CachetHQ\Cachet\Bus\Commands\Metric\UpdateMetricPointCommand $command
|
||||
*
|
||||
* @return \CachetHQ\Cachet\Models\MetricPoint
|
||||
*/
|
||||
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Cachet.
|
||||
*
|
||||
* (c) Alt Three Services Limited
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Bus\Handlers\Commands\Subscriber;
|
||||
|
||||
use CachetHQ\Cachet\Bus\Commands\Subscriber\SubscribeSubscriberCommand;
|
||||
use CachetHQ\Cachet\Bus\Commands\Subscriber\VerifySubscriberCommand;
|
||||
use CachetHQ\Cachet\Bus\Events\Subscriber\SubscriberHasSubscribedEvent;
|
||||
use CachetHQ\Cachet\Bus\Events\Subscriber\SubscriberHasUpdatedSubscriptionsEvent;
|
||||
use CachetHQ\Cachet\Bus\Exceptions\Subscriber\AlreadySubscribedException;
|
||||
use CachetHQ\Cachet\Models\Subscriber;
|
||||
use CachetHQ\Cachet\Models\Subscription;
|
||||
|
||||
/**
|
||||
* This is the subscribe subscriber command handler.
|
||||
*
|
||||
* @author James Brooks <james@alt-three.com>
|
||||
*/
|
||||
class SubscribeSubscriberCommandHandler
|
||||
{
|
||||
/**
|
||||
* Handle the subscribe subscriber command.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Bus\Commands\Subscriber\SubscribeSubscriberCommand $command
|
||||
*
|
||||
* @throws \CachetHQ\Cachet\Exceptions\AlreadySubscribedException
|
||||
*
|
||||
* @return \CachetHQ\Cachet\Models\Subscriber
|
||||
*/
|
||||
public function handle(SubscribeSubscriberCommand $command)
|
||||
{
|
||||
if (Subscriber::where('email', $command->email)->first() && $command->subscriptions === null) {
|
||||
throw new AlreadySubscribedException("Cannot subscribe {$command->email} because they're already subscribed.");
|
||||
}
|
||||
|
||||
$subscriber = Subscriber::firstOrCreate(['email' => $command->email]);
|
||||
|
||||
if ($subscriptions = $command->subscriptions) {
|
||||
foreach ($subscriptions as $subscription => $subscriptionValue) {
|
||||
Subscription::firstOrCreate([
|
||||
'subscriber_id' => $subscriber->id,
|
||||
$subscription => $subscriptionValue,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
if ($subscriber->is_verified === false) {
|
||||
if ($command->verified) {
|
||||
dispatch(new VerifySubscriberCommand($subscriber));
|
||||
} else {
|
||||
event(new SubscriberHasSubscribedEvent($subscriber));
|
||||
}
|
||||
} else {
|
||||
event(new SubscriberHasUpdatedSubscriptionsEvent($subscriber));
|
||||
}
|
||||
|
||||
return $subscriber;
|
||||
}
|
||||
}
|
||||
@@ -9,10 +9,10 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Handlers\Commands\Subscriber;
|
||||
namespace CachetHQ\Cachet\Bus\Handlers\Commands\Subscriber;
|
||||
|
||||
use CachetHQ\Cachet\Commands\Subscriber\UnsubscribeSubscriberCommand;
|
||||
use CachetHQ\Cachet\Events\Subscriber\SubscriberHasUnsubscribedEvent;
|
||||
use CachetHQ\Cachet\Bus\Commands\Subscriber\UnsubscribeSubscriberCommand;
|
||||
use CachetHQ\Cachet\Bus\Events\Subscriber\SubscriberHasUnsubscribedEvent;
|
||||
use CachetHQ\Cachet\Models\Subscriber;
|
||||
|
||||
class UnsubscribeSubscriberCommandHandler
|
||||
@@ -20,7 +20,7 @@ class UnsubscribeSubscriberCommandHandler
|
||||
/**
|
||||
* Handle the subscribe customer command.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Commands\Subscriber\UnsubscribeSubscriberCommand $command
|
||||
* @param \CachetHQ\Cachet\Bus\Commands\Subscriber\UnsubscribeSubscriberCommand $command
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Cachet.
|
||||
*
|
||||
* (c) Alt Three Services Limited
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Bus\Handlers\Commands\Subscriber;
|
||||
|
||||
use CachetHQ\Cachet\Bus\Commands\Subscriber\UnsubscribeSubscriptionCommand;
|
||||
use CachetHQ\Cachet\Bus\Events\Subscriber\SubscriberHasUnsubscribedEvent;
|
||||
use CachetHQ\Cachet\Models\Subscription;
|
||||
|
||||
class UnsubscribeSubscriptionCommandHandler
|
||||
{
|
||||
/**
|
||||
* Handle the unsubscribe subscription command.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Bus\Commands\Subscriber\UnsubscribeSubscriptionCommand $command
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function handle(UnsubscribeSubscriptionCommand $command)
|
||||
{
|
||||
$subscription = $command->subscription;
|
||||
|
||||
event(new SubscriberHasUnsubscribedEvent($subscription->subscriber));
|
||||
|
||||
$subscription->delete();
|
||||
}
|
||||
}
|
||||
@@ -9,10 +9,10 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Handlers\Commands\Subscriber;
|
||||
namespace CachetHQ\Cachet\Bus\Handlers\Commands\Subscriber;
|
||||
|
||||
use CachetHQ\Cachet\Commands\Subscriber\VerifySubscriberCommand;
|
||||
use CachetHQ\Cachet\Events\Subscriber\SubscriberHasVerifiedEvent;
|
||||
use CachetHQ\Cachet\Bus\Commands\Subscriber\VerifySubscriberCommand;
|
||||
use CachetHQ\Cachet\Bus\Events\Subscriber\SubscriberHasVerifiedEvent;
|
||||
use CachetHQ\Cachet\Models\Subscriber;
|
||||
use Carbon\Carbon;
|
||||
|
||||
@@ -21,7 +21,7 @@ class VerifySubscriberCommandHandler
|
||||
/**
|
||||
* Handle the subscribe customer command.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Commands\Subscriber\VerifySubscriberCommand $command
|
||||
* @param \CachetHQ\Cachet\Bus\Commands\Subscriber\VerifySubscriberCommand $command
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@@ -29,6 +29,7 @@ class VerifySubscriberCommandHandler
|
||||
{
|
||||
$subscriber = $command->subscriber;
|
||||
|
||||
// Mark the subscriber as verified.
|
||||
$subscriber->verified_at = Carbon::now();
|
||||
$subscriber->save();
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Handlers\Commands\User;
|
||||
namespace CachetHQ\Cachet\Bus\Handlers\Commands\User;
|
||||
|
||||
use CachetHQ\Cachet\Commands\User\AddTeamMemberCommand;
|
||||
use CachetHQ\Cachet\Events\User\UserWasAddedEvent;
|
||||
use CachetHQ\Cachet\Bus\Commands\User\AddTeamMemberCommand;
|
||||
use CachetHQ\Cachet\Bus\Events\User\UserWasAddedEvent;
|
||||
use CachetHQ\Cachet\Models\User;
|
||||
|
||||
class AddTeamMemberCommandHandler
|
||||
@@ -20,7 +20,7 @@ class AddTeamMemberCommandHandler
|
||||
/**
|
||||
* Handle the add team member command.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Commands\User\AddTeamMemberCommand $command
|
||||
* @param \CachetHQ\Cachet\Bus\Commands\User\AddTeamMemberCommand $command
|
||||
*
|
||||
* @return \CachetHQ\Cachet\Models\User
|
||||
*/
|
||||
@@ -9,9 +9,9 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Handlers\Commands\User;
|
||||
namespace CachetHQ\Cachet\Bus\Handlers\Commands\User;
|
||||
|
||||
use CachetHQ\Cachet\Commands\User\GenerateApiTokenCommand;
|
||||
use CachetHQ\Cachet\Bus\Commands\User\GenerateApiTokenCommand;
|
||||
use CachetHQ\Cachet\Models\User;
|
||||
|
||||
class GenerateApiTokenCommandHandler
|
||||
@@ -19,7 +19,7 @@ class GenerateApiTokenCommandHandler
|
||||
/**
|
||||
* Handle the generate api key command.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Commands\User\GenerateApiTokenCommand $command
|
||||
* @param \CachetHQ\Cachet\Bus\Commands\User\GenerateApiTokenCommand $command
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@@ -9,10 +9,10 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Handlers\Commands\User;
|
||||
namespace CachetHQ\Cachet\Bus\Handlers\Commands\User;
|
||||
|
||||
use CachetHQ\Cachet\Commands\User\InviteTeamMemberCommand;
|
||||
use CachetHQ\Cachet\Events\User\UserWasInvitedEvent;
|
||||
use CachetHQ\Cachet\Bus\Commands\User\InviteTeamMemberCommand;
|
||||
use CachetHQ\Cachet\Bus\Events\User\UserWasInvitedEvent;
|
||||
use CachetHQ\Cachet\Models\Invite;
|
||||
|
||||
class InviteTeamMemberCommandHandler
|
||||
@@ -20,7 +20,7 @@ class InviteTeamMemberCommandHandler
|
||||
/**
|
||||
* Handle the invite team member command.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Commands\User\InviteTeamMemberCommand $command
|
||||
* @param \CachetHQ\Cachet\Bus\Commands\User\InviteTeamMemberCommand $command
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@@ -9,10 +9,10 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Handlers\Commands\User;
|
||||
namespace CachetHQ\Cachet\Bus\Handlers\Commands\User;
|
||||
|
||||
use CachetHQ\Cachet\Commands\User\RemoveUserCommand;
|
||||
use CachetHQ\Cachet\Events\User\UserWasRemovedEvent;
|
||||
use CachetHQ\Cachet\Bus\Commands\User\RemoveUserCommand;
|
||||
use CachetHQ\Cachet\Bus\Events\User\UserWasRemovedEvent;
|
||||
use CachetHQ\Cachet\Models\User;
|
||||
|
||||
class RemoveUserCommandHandler
|
||||
@@ -20,7 +20,7 @@ class RemoveUserCommandHandler
|
||||
/**
|
||||
* Handle the remove user command.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Commands\User\RemoveUserCommand $command
|
||||
* @param \CachetHQ\Cachet\Bus\Commands\User\RemoveUserCommand $command
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@@ -9,10 +9,10 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Handlers\Commands\User;
|
||||
namespace CachetHQ\Cachet\Bus\Handlers\Commands\User;
|
||||
|
||||
use CachetHQ\Cachet\Commands\User\SignupUserCommand;
|
||||
use CachetHQ\Cachet\Events\User\UserWasAddedEvent;
|
||||
use CachetHQ\Cachet\Bus\Commands\User\SignupUserCommand;
|
||||
use CachetHQ\Cachet\Bus\Events\User\UserWasAddedEvent;
|
||||
use CachetHQ\Cachet\Models\User;
|
||||
|
||||
class SignupUserCommandHandler
|
||||
@@ -20,7 +20,7 @@ class SignupUserCommandHandler
|
||||
/**
|
||||
* Handle the signup user command.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Commands\User\SignupUserCommand $command
|
||||
* @param \CachetHQ\Cachet\Bus\Commands\User\SignupUserCommand $command
|
||||
*
|
||||
* @return \CachetHQ\Cachet\Models\User
|
||||
*/
|
||||
@@ -30,7 +30,7 @@ class SignupUserCommandHandler
|
||||
'username' => $command->username,
|
||||
'password' => $command->password,
|
||||
'email' => $command->email,
|
||||
'level' => 2,
|
||||
'level' => User::LEVEL_USER,
|
||||
]);
|
||||
|
||||
event(new UserWasAddedEvent($user));
|
||||
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Cachet.
|
||||
*
|
||||
* (c) Alt Three Services Limited
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Bus\Handlers\Events\Component;
|
||||
|
||||
use CachetHQ\Cachet\Bus\Events\Component\ComponentWasUpdatedEvent;
|
||||
use CachetHQ\Cachet\Models\Component;
|
||||
use CachetHQ\Cachet\Models\Subscription;
|
||||
use Illuminate\Contracts\Mail\MailQueue;
|
||||
use Illuminate\Mail\Message;
|
||||
use McCool\LaravelAutoPresenter\Facades\AutoPresenter;
|
||||
|
||||
class SendComponentUpdateEmailNotificationHandler
|
||||
{
|
||||
/**
|
||||
* The mailer instance.
|
||||
*
|
||||
* @var \Illuminate\Contracts\Mail\Mailer
|
||||
*/
|
||||
protected $mailer;
|
||||
|
||||
/**
|
||||
* Create a new send incident email notification handler.
|
||||
*
|
||||
* @param \Illuminate\Contracts\Mail\Mailer $mailer
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(MailQueue $mailer)
|
||||
{
|
||||
$this->mailer = $mailer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the event.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Bus\Events\Component\ComponentWasUpdatedEvent $event
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function handle(ComponentWasUpdatedEvent $event)
|
||||
{
|
||||
$component = AutoPresenter::decorate($event->component);
|
||||
|
||||
$mail = [
|
||||
'subject' => trans('cachet.subscriber.email.component.subject'),
|
||||
'component_name' => $component->name,
|
||||
'component_human_status' => $component->human_status,
|
||||
];
|
||||
|
||||
foreach (Subscription::isVerifiedForComponent($component->id)->with('subscriber')->get() as $subscription) {
|
||||
$subscriber = $subscription->subscriber;
|
||||
$mail['email'] = $subscriber->email;
|
||||
$mail['manage_link'] = route('subscribe.manage', ['code' => $subscriber->verify_code]);
|
||||
$mail['unsubscribe_link'] = route('subscribe.unsubscribe', ['code' => $subscriber->verify_code, 'subscription' => $subscription->id]);
|
||||
|
||||
$this->mailer->queue([
|
||||
'html' => 'emails.components.update-html',
|
||||
'text' => 'emails.components.update-text',
|
||||
], $mail, function (Message $message) use ($mail) {
|
||||
$message->to($mail['email'])->subject($mail['subject']);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,9 +9,9 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Handlers\Events\Incident;
|
||||
namespace CachetHQ\Cachet\Bus\Handlers\Events\Incident;
|
||||
|
||||
use CachetHQ\Cachet\Events\Incident\IncidentWasReportedEvent;
|
||||
use CachetHQ\Cachet\Bus\Events\Incident\IncidentWasReportedEvent;
|
||||
use CachetHQ\Cachet\Models\Subscriber;
|
||||
use Illuminate\Contracts\Mail\MailQueue;
|
||||
use Illuminate\Mail\Message;
|
||||
@@ -50,7 +50,7 @@ class SendIncidentEmailNotificationHandler
|
||||
/**
|
||||
* Handle the event.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Events\Incident\IncidentHasReportedEvent $event
|
||||
* @param \CachetHQ\Cachet\Bus\Events\Incident\IncidentHasReportedEvent $event
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@@ -71,10 +71,11 @@ class SendIncidentEmailNotificationHandler
|
||||
'subject' => 'New incident reported.',
|
||||
'has_component' => ($event->incident->component) ? true : false,
|
||||
'component_name' => $component ? $component->name : null,
|
||||
'status' => $incident->humanStatus,
|
||||
'status' => $incident->human_status,
|
||||
'html_content' => $incident->formattedMessage,
|
||||
'text_content' => $incident->message,
|
||||
'token' => $subscriber->token,
|
||||
'manage_link' => route('subscribe.manage', ['code' => $subscriber->verify_code]),
|
||||
'unsubscribe_link' => route('subscribe.unsubscribe', ['code' => $subscriber->verify_code]),
|
||||
];
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Handlers\Events\Incident;
|
||||
namespace CachetHQ\Cachet\Bus\Handlers\Events\Incident;
|
||||
|
||||
use CachetHQ\Cachet\Events\Incident\MaintenanceWasScheduledEvent;
|
||||
use CachetHQ\Cachet\Bus\Events\Incident\MaintenanceWasScheduledEvent;
|
||||
use CachetHQ\Cachet\Models\Subscriber;
|
||||
use Illuminate\Contracts\Mail\MailQueue;
|
||||
use Illuminate\Mail\Message;
|
||||
@@ -50,7 +50,7 @@ class SendMaintenanceEmailNotificationHandler
|
||||
/**
|
||||
* Handle the event.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Events\MaintenanceHasScheduledEvent $event
|
||||
* @param \CachetHQ\Cachet\Bus\Events\MaintenanceHasScheduledEvent $event
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@@ -66,11 +66,12 @@ class SendMaintenanceEmailNotificationHandler
|
||||
$mail = [
|
||||
'email' => $subscriber->email,
|
||||
'subject' => 'Scheduled maintenance.',
|
||||
'status' => $data->humanStatus,
|
||||
'status' => $data->human_status,
|
||||
'html_content' => $data->formattedMessage,
|
||||
'text_content' => $data->message,
|
||||
'scheduled_at' => $data->scheduled_at_formatted,
|
||||
'token' => $subscriber->token,
|
||||
'manage_link' => route('subscribe.manage', ['code' => $subscriber->verify_code]),
|
||||
'unsubscribe_link' => route('subscribe.unsubscribe', ['code' => $subscriber->verify_code]),
|
||||
];
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Handlers\Events\Subscriber;
|
||||
namespace CachetHQ\Cachet\Bus\Handlers\Events\Subscriber;
|
||||
|
||||
use CachetHQ\Cachet\Events\Subscriber\SubscriberHasSubscribedEvent;
|
||||
use CachetHQ\Cachet\Bus\Events\Subscriber\SubscriberHasSubscribedEvent;
|
||||
use Illuminate\Contracts\Mail\MailQueue;
|
||||
use Illuminate\Mail\Message;
|
||||
|
||||
@@ -39,7 +39,7 @@ class SendSubscriberVerificationEmailHandler
|
||||
/**
|
||||
* Handle the event.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Events\SubscriberHasSubscribedEvent $event
|
||||
* @param \CachetHQ\Cachet\Bus\Events\SubscriberHasSubscribedEvent $event
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@@ -9,9 +9,9 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Handlers\Events\User;
|
||||
namespace CachetHQ\Cachet\Bus\Handlers\Events\User;
|
||||
|
||||
use CachetHQ\Cachet\Events\User\UserWasInvitedEvent;
|
||||
use CachetHQ\Cachet\Bus\Events\User\UserWasInvitedEvent;
|
||||
use Illuminate\Contracts\Mail\MailQueue;
|
||||
use Illuminate\Mail\Message;
|
||||
|
||||
@@ -39,7 +39,7 @@ class SendInviteUserEmailHandler
|
||||
/**
|
||||
* Handle the event.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Events\UserWasInvitedEvent $event
|
||||
* @param \CachetHQ\Cachet\Bus\Events\UserWasInvitedEvent $event
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@@ -11,7 +11,6 @@
|
||||
|
||||
namespace CachetHQ\Cachet\Composers;
|
||||
|
||||
use CachetHQ\Cachet\Facades\Setting;
|
||||
use GrahamCampbell\Markdown\Facades\Markdown;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\Support\Facades\Config;
|
||||
@@ -27,20 +26,31 @@ class AppComposer
|
||||
*/
|
||||
public function compose(View $view)
|
||||
{
|
||||
$view->withAboutApp(Markdown::convertToHtml(Setting::get('app_about')));
|
||||
$view->withAppAnalytics(Setting::get('app_analytics'));
|
||||
$view->withAppAnalyticsGoSquared(Setting::get('app_analytics_gs'));
|
||||
$view->withAppAnalyticsPiwikUrl(Setting::get('app_analytics_piwik_url'));
|
||||
$view->withAppAnalyticsPiwikSiteId(Setting::get('app_analytics_piwik_siteid'));
|
||||
$view->withAppBanner(Setting::get('app_banner'));
|
||||
$view->withAppBannerStyleFullWidth(Setting::get('style_fullwidth_header'));
|
||||
$view->withAppBannerType(Setting::get('app_banner_type'));
|
||||
$view->withAppDomain(Setting::get('app_domain'));
|
||||
$view->withAppGraphs(Setting::get('display_graphs'));
|
||||
$view->withAppLocale(Setting::get('app_locale'));
|
||||
$view->withAppName(Setting::get('app_name'));
|
||||
$view->withAppStylesheet(Setting::get('stylesheet'));
|
||||
$view->withAboutApp(Markdown::convertToHtml(Config::get('setting.app_about')));
|
||||
$view->withAppAnalytics(Config::get('setting.app_analytics'));
|
||||
$view->withAppAnalyticsGoSquared(Config::get('setting.app_analytics_gs'));
|
||||
$view->withAppAnalyticsPiwikUrl(Config::get('setting.app_analytics_piwik_url'));
|
||||
$view->withAppAnalyticsPiwikSiteId(Config::get('setting.app_analytics_piwik_site_id'));
|
||||
$view->withAppBanner(Config::get('setting.app_banner'));
|
||||
$view->withAppBannerStyleFullWidth(Config::get('setting.style_fullwidth_header'));
|
||||
$view->withAppBannerType(Config::get('setting.app_banner_type'));
|
||||
$view->withAppDomain(Config::get('setting.app_domain'));
|
||||
$view->withAppGraphs(Config::get('setting.display_graphs'));
|
||||
$view->withAppLocale(Config::get('setting.app_locale'));
|
||||
$view->withAppStylesheet(Config::get('setting.stylesheet'));
|
||||
$view->withAppUrl(Config::get('app.url'));
|
||||
$view->withShowSupport(Setting::get('show_support'));
|
||||
$view->withAppHeader(Config::get('setting.header'));
|
||||
$view->withAppFooter(Config::get('setting.footer'));
|
||||
|
||||
$view->withAppName($name = Config::get('setting.app_name'));
|
||||
$view->withShowSupport($support = Config::get('setting.show_support'));
|
||||
|
||||
if ($support) {
|
||||
$view->withSiteTitle(Config::get('setting.app_name').' | Cachet');
|
||||
} else {
|
||||
$view->withSiteTitle(Config::get('setting.app_name'));
|
||||
}
|
||||
|
||||
$view->withFontSubset(Config::get('langs.'.Config::get('app.locale').'.subset', 'latin'));
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user