diff --git a/Admin/Installer.php b/Admin/Installer.php index e056a9b..9a3ab32 100644 --- a/Admin/Installer.php +++ b/Admin/Installer.php @@ -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, diff --git a/Models/Media.php b/Models/Media.php index 8577645..b9ba89b 100644 --- a/Models/Media.php +++ b/Models/Media.php @@ -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 * diff --git a/Models/MediaMapper.php b/Models/MediaMapper.php index 6235a48..0ce028b 100644 --- a/Models/MediaMapper.php +++ b/Models/MediaMapper.php @@ -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'],