Completed
Push — master ( 3653e4...6fb8c6 )
by Xu
05:26
created

EmailChannel::send()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 0
nc 1
nop 1
dl 0
loc 2
rs 10
c 0
b 0
f 0
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\notifications\channels;
9
10
11
use yii\di\Instance;
12
use yuncms\notifications\contracts\NotificationInterface;
13
14
class EmailChannel extends Channel
15
{
16
    /**
17
     * @var \yii\mail\MailerInterface|array|string the mailer object or the application component ID of the mailer object.
18
     * After the EmailChannel object is created, if you want to change this property, you should only assign it
19
     * with a mailer object.
20
     */
21
    public $mailer = 'mailer';
22
23
    /**
24
     * @inheritdoc
25
     */
26
    public function init()
27
    {
28
        parent::init();
29
        $this->mailer = Instance::ensure($this->mailer, 'yii\mail\MailerInterface');
30
    }
31
32
    /**
33
     * Get channel name.
34
     * @return string
35
     */
36
    public function getName()
37
    {
38
        return 'EMail';
39
    }
40
41
    /**
42
     * Sends a notification in this channel.
43
     * @param NotificationInterface $notification
44
     */
45
    public function send(NotificationInterface $notification)
46
    {
47
48
    }
49
}