File tree 2 files changed +44
-1
lines changed
2 files changed +44
-1
lines changed Original file line number Diff line number Diff line change 10
10
use yii \di \ServiceLocator ;
11
11
use yii \base \InvalidConfigException ;
12
12
use xutl \qcloud \components \Cdn ;
13
+ use xutl \qcloud \components \Cmq ;
13
14
14
15
/**
15
16
* Class QCloud
@@ -82,15 +83,24 @@ public function getCdn()
82
83
return $ this ->get ('cdn ' );
83
84
}
84
85
86
+ /**
87
+ * @return Cmq|object
88
+ * @throws InvalidConfigException
89
+ */
90
+ public function getCmq ()
91
+ {
92
+ return $ this ->get ('cmq ' );
93
+ }
94
+
85
95
/**
86
96
* Returns the configuration of qcloud components.
87
97
* @see set()
88
98
*/
89
99
public function coreComponents ()
90
100
{
91
101
return [
92
- 'ccs ' => ['class ' => 'xutl\qcloud\components\CCS ' ],
93
102
'cdn ' => ['class ' => 'xutl\qcloud\components\Cdn ' ],
103
+ 'cmq ' => ['class ' => 'xutl\qcloud\components\Cmq ' ],
94
104
];
95
105
}
96
106
}
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * @link http://www.tintsoft.com/
4
+ * @copyright Copyright (c) 2012 TintSoft Technology Co. Ltd.
5
+ * @license http://www.tintsoft.com/license/
6
+ */
7
+
8
+
9
+ namespace xutl \qcloud \components ;
10
+
11
+ use xutl \qcloud \BaseClient ;
12
+ use yii \base \InvalidConfigException ;
13
+
14
+ /**
15
+ * Class Cmq
16
+ * @package xutl\qcloud\components
17
+ *
18
+ * @author Tongle Xu <[email protected] >
19
+ * @since 1.0
20
+ */
21
+ class Cmq extends BaseClient
22
+ {
23
+ /**
24
+ * @throws InvalidConfigException
25
+ */
26
+ public function init ()
27
+ {
28
+ parent ::init ();
29
+ if (empty ($ this ->baseUrl )) {
30
+ throw new InvalidConfigException ('The "baseUrl" property must be set. ' );
31
+ }
32
+ }
33
+ }
You can’t perform that action at this time.
0 commit comments