Automation/app/Entities/MyStorage/FileEntity.php
2024-09-08 15:24:55 +09:00

52 lines
1.2 KiB
PHP

<?php
namespace App\Entities\MyStorage;
use App\Entities\CommonEntity;
class FileEntity extends CommonEntity
{
public function __construct(array|null $data = null)
{
parent::__construct($data);
}
public function __toString(): string
{
return "{$this->getTitle()}";
}
public function getTitle(): string
{
return $this->attributes['file_name'];
}
public function setTitle(string $file_name): void
{
$this->attributes['file_name'] = $file_name;
}
//Common Function
public function getPath(): string
{
return $this->attributes['file_path'];
}
public function setPath(string $file_path): void
{
$this->attributes['file_path'] = $file_path;
}
final public function getMimeType(): string
{
return $this->attributes['file_type'];
}
public function setMimeType(string $mimetype): void
{
$this->attributes['file_type'] = $mimetype;
}
final public function getMediaHTML(): string
{
return $this->attributes['media_html'];
}
public function setMediaHTML(string $media_html): void
{
$this->attributes['media_html'] = $media_html;
}
}