审查视图

vendor/overtrue/wechat/src/Message/Image.php 945 字节
王智 authored
1 2 3 4 5 6 7 8 9 10 11 12
<?php

/*
 * This file is part of the overtrue/wechat.
 *
 * (c) overtrue <i@overtrue.me>
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */

/**
王智 authored
13
 * Image.php.
王智 authored
14 15 16 17 18 19 20 21
 *
 * @author    overtrue <i@overtrue.me>
 * @copyright 2015 overtrue <i@overtrue.me>
 *
 * @see      https://github.com/overtrue
 * @see      http://overtrue.me
 */
王智 authored
22
namespace EasyWeChat\Message;
王智 authored
23 24

/**
王智 authored
25 26 27
 * Class Image.
 *
 * @property string $media_id
王智 authored
28
 */
王智 authored
29
class Image extends AbstractMessage
王智 authored
30 31 32 33 34 35
{
    /**
     * Message type.
     *
     * @var string
     */
王智 authored
36
    protected $type = 'image';
王智 authored
37 38 39 40 41 42

    /**
     * Properties.
     *
     * @var array
     */
王智 authored
43
    protected $properties = ['media_id'];
王智 authored
44 45

    /**
王智 authored
46 47 48
     * Set media_id.
     *
     * @param string $mediaId
王智 authored
49
     *
王智 authored
50
     * @return Image
王智 authored
51
     */
王智 authored
52
    public function media($mediaId)
王智 authored
53
    {
王智 authored
54 55 56
        $this->setAttribute('media_id', $mediaId);

        return $this;
王智 authored
57 58
    }
}