1: <?php
2: namespace Ctct\Components\Library;
3:
4: use Ctct\Components\Component;
5:
6: /**
7: * Represents a Thumbnail of a File
8: *
9: * @package Components
10: * @subpackage Library
11: * @author Constant Contact
12: */
13: class Thumbnail extends Component {
14: /**
15: * URL to the thumbnail hosted by Constant Contact
16: * @var String
17: */
18: public $url;
19:
20: /**
21: * Width of the thumbnail, in pixels
22: * @var int
23: */
24: public $width;
25:
26: /**
27: * Height of the thumbnail, in pixels
28: * @var int
29: */
30: public $height;
31:
32: public static function create(array $props) {
33: $thumbnail = new Thumbnail();
34:
35: $thumbnail->url = parent::getValue($props, "url");
36: $thumbnail->width = parent::getValue($props, "width");
37: $thumbnail->height = parent::getValue($props, "height");
38:
39: return $thumbnail;
40: }
41: }