2014-05-03 22:14:00 +02:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Used for serializing files output from jobs
|
|
|
|
*/
|
|
|
|
class ApiFileOutput
|
|
|
|
{
|
|
|
|
public $fileContent;
|
|
|
|
public $fileName;
|
2014-05-13 14:00:25 +02:00
|
|
|
public $lastModified;
|
|
|
|
public $mimeType;
|
2014-05-03 22:14:00 +02:00
|
|
|
|
|
|
|
public function __construct($filePath, $fileName)
|
|
|
|
{
|
|
|
|
$this->fileContent = file_get_contents($filePath);
|
|
|
|
$this->fileName = $fileName;
|
|
|
|
$this->lastModified = filemtime($filePath);
|
|
|
|
$this->mimeType = mime_content_type($filePath);
|
|
|
|
}
|
|
|
|
}
|