forked from thenbsp/wechat
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVideo.php
More file actions
69 lines (58 loc) · 1.21 KB
/
Video.php
File metadata and controls
69 lines (58 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
namespace Thenbsp\Wechat\Message\Entity;
use Thenbsp\Wechat\Message\Entity;
class Video extends Entity
{
/**
* 通过上传多媒体文件,得到的id
*/
protected $mediaId;
/**
* 视频消息的标题
*/
protected $title;
/**
* 视频消息的描述
*/
protected $description;
/**
* 通过上传多媒体文件,得到的id
*/
public function setMediaId($mediaId)
{
$this->mediaId = $mediaId;
}
/**
* 视频消息的标题
*/
public function setTitle($title)
{
$this->title = $title;
}
/**
* 视频消息的描述
*/
public function setDescription($description)
{
$this->description = $description;
}
/**
* 消息内容
*/
public function getBody()
{
$body = array(
'MediaId' => $this->mediaId,
'Title' => $this->title,
'Description' => $this->description
);
return array('Video'=>$body);
}
/**
* 消息类型
*/
public function getType()
{
return 'video';
}
}