This commit is contained in:
Dennis Eichhorn 2017-10-06 17:33:10 +02:00
parent fa41fcace7
commit d87a89cf3d
3 changed files with 30 additions and 0 deletions

View File

@ -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,

View File

@ -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
*

View File

@ -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'],