Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
Class.Attachment.php
Go to the documentation of this file.
1 <?php
2 /*
3  * @author Anakeen
4  * @package FDL
5 */
6 
7 namespace Dcp\Mail;
8 
9 class Attachment implements DataSource
10 {
11  public $file = '';
12  public $name = '';
13  public $type = '';
14  public function __construct($file, $name = 'att.dat', $type = 'application/binary')
15  {
16  $this->file = $file;
17  $this->name = $name;
18  $this->type = $type;
19  }
20  public function getMimeType()
21  {
22  return $this->type;
23  }
24  public function getData()
25  {
26  return file_get_contents($this->file);
27  }
28  public function getName()
29  {
30  return $this->name;
31  }
32 }
$s type
Definition: dav.php:73
print $fam getTitle() $fam name
__construct($file, $name= 'att.dat', $type= 'application/binary')
← centre documentaire © anakeen