[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class PhabricatorMetaMTAAttachment { 4 protected $data; 5 protected $filename; 6 protected $mimetype; 7 8 public function __construct($data, $filename, $mimetype) { 9 $this->setData($data); 10 $this->setFilename($filename); 11 $this->setMimeType($mimetype); 12 } 13 14 public function getData() { 15 return $this->data; 16 } 17 18 public function setData($data) { 19 $this->data = $data; 20 return $this; 21 } 22 23 public function getFilename() { 24 return $this->filename; 25 } 26 27 public function setFilename($filename) { 28 $this->filename = $filename; 29 return $this; 30 } 31 32 public function getMimeType() { 33 return $this->mimetype; 34 } 35 36 public function setMimeType($mimetype) { 37 $this->mimetype = $mimetype; 38 return $this; 39 } 40 41 public function toDictionary() { 42 return array( 43 'filename' => $this->getFilename(), 44 'mimetype' => $this->getMimetype(), 45 'data' => $this->getData(), 46 ); 47 } 48 49 public static function newFromDictionary(array $dict) { 50 return new PhabricatorMetaMTAAttachment( 51 idx($dict, 'data'), 52 idx($dict, 'filename'), 53 idx($dict, 'mimetype')); 54 } 55 56 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |