mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-02-02 18:58:42 +00:00
fix #101
This commit is contained in:
parent
fa41fcace7
commit
d87a89cf3d
|
|
@ -47,6 +47,7 @@ class Installer extends InstallerAbstract
|
|||
`media_description` text DEFAULT NULL,
|
||||
`media_versioned` tinyint(1) NOT NULL,
|
||||
`media_file` varchar(255) NOT NULL,
|
||||
`media_absolute` tinyint(1) NOT NULL,
|
||||
`media_extension` varchar(10) DEFAULT NULL,
|
||||
`media_collection` tinyint(1) DEFAULT NULL,
|
||||
`media_size` int(11) DEFAULT NULL,
|
||||
|
|
|
|||
|
|
@ -82,6 +82,14 @@ class Media
|
|||
*/
|
||||
protected $path = '';
|
||||
|
||||
/**
|
||||
* Is path absolute?
|
||||
*
|
||||
* @var bool
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected $isAbsolute = false;
|
||||
|
||||
/**
|
||||
* Is versioned.
|
||||
*
|
||||
|
|
@ -118,6 +126,26 @@ class Media
|
|||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function isAbsolute() : bool
|
||||
{
|
||||
return $this->isAbsolute;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setAbsolute(bool $absolute) /* void */
|
||||
{
|
||||
$this->isAbsolute = $absolute;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ class MediaMapper extends DataMapperAbstract
|
|||
'media_description' => ['name' => 'media_description', 'type' => 'string', 'internal' => 'description'],
|
||||
'media_versioned' => ['name' => 'media_versioned', 'type' => 'bool', 'internal' => 'versioned'],
|
||||
'media_file' => ['name' => 'media_file', 'type' => 'string', 'internal' => 'path'],
|
||||
'media_absolute' => ['name' => 'media_absolute', 'type' => 'string', 'internal' => 'isAbsolute'],
|
||||
'media_extension' => ['name' => 'media_extension', 'type' => 'string', 'internal' => 'extension'],
|
||||
'media_description' => ['name' => 'media_description', 'type' => 'string', 'internal' => 'description'],
|
||||
'media_size' => ['name' => 'media_size', 'type' => 'int', 'internal' => 'size'],
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user