|
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
|
|
|
namespace yuncms\base; |
|
9
|
|
|
|
|
10
|
|
|
use yii\authclient\Collection; |
|
11
|
|
|
use yuncms\components\Settings; |
|
12
|
|
|
use yuncms\filesystem\Filesystem; |
|
13
|
|
|
|
|
14
|
|
|
/** |
|
15
|
|
|
* Trait ApplicationTrait |
|
16
|
|
|
* @property \yuncms\components\Settings $settings The settings manager component |
|
17
|
|
|
* @property \yii\authclient\Collection $authClientCollection The authClient Collection component |
|
18
|
|
|
* @property \yii\queue\Queue $queue The queue component |
|
19
|
|
|
* @property \yuncms\notifications\NotificationManager $notifications The notifications component |
|
20
|
|
|
* @property \yii\redis\Connection $redis The redis component |
|
21
|
|
|
* @property \yuncms\filesystem\Filesystem $filesystem The filesystem component |
|
22
|
|
|
*/ |
|
23
|
|
|
trait ApplicationTrait |
|
24
|
|
|
{ |
|
25
|
|
|
/** |
|
26
|
|
|
* Returns the settings component. |
|
27
|
|
|
* @return \yuncms\filesystem\Filesystem the filesystem connection. |
|
28
|
|
|
*/ |
|
29
|
|
|
public function getFilesystem(): Filesystem |
|
30
|
|
|
{ |
|
31
|
|
|
return $this->get('filesystem'); |
|
|
|
|
|
|
32
|
|
|
} |
|
33
|
|
|
|
|
34
|
|
|
/** |
|
35
|
|
|
* Returns the settings component. |
|
36
|
|
|
* @return \yuncms\components\Settings the settings connection. |
|
37
|
|
|
*/ |
|
38
|
|
|
public function getSettings(): Settings |
|
39
|
|
|
{ |
|
40
|
|
|
return $this->get('settings'); |
|
41
|
|
|
} |
|
42
|
|
|
|
|
43
|
|
|
/** |
|
44
|
|
|
* Returns the queue component. |
|
45
|
|
|
* @return \yii\queue\Queue the queue connection. |
|
46
|
|
|
*/ |
|
47
|
|
|
public function getQueue() |
|
48
|
|
|
{ |
|
49
|
|
|
return $this->get('queue'); |
|
50
|
|
|
} |
|
51
|
|
|
|
|
52
|
|
|
/** |
|
53
|
|
|
* Returns the notifications component. |
|
54
|
|
|
* @return \yuncms\notifications\NotificationManager the notifications connection. |
|
55
|
|
|
*/ |
|
56
|
|
|
public function getNotifications() |
|
57
|
|
|
{ |
|
58
|
|
|
return $this->get('notifications'); |
|
59
|
|
|
} |
|
60
|
|
|
|
|
61
|
|
|
/** |
|
62
|
|
|
* Returns the authClientCollection component. |
|
63
|
|
|
* @return \yii\authclient\Collection the authClientCollection connection. |
|
64
|
|
|
*/ |
|
65
|
|
|
public function getAuthClientCollection(): Collection |
|
66
|
|
|
{ |
|
67
|
|
|
return $this->get('authClientCollection'); |
|
68
|
|
|
} |
|
69
|
|
|
} |