mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-02-15 00:38:41 +00:00
fix phpcs findings
This commit is contained in:
parent
8c7f28d057
commit
0c2bb4d9d7
|
|
@ -4,11 +4,11 @@
|
||||||
*
|
*
|
||||||
* PHP Version 7.4
|
* PHP Version 7.4
|
||||||
*
|
*
|
||||||
* @package Modules\Media\Admin\Install
|
* @package Modules\Media\Admin\Install
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
|
@ -19,10 +19,10 @@ use phpOMS\DataStorage\Database\DatabasePool;
|
||||||
/**
|
/**
|
||||||
* Navigation class.
|
* Navigation class.
|
||||||
*
|
*
|
||||||
* @package Modules\Media\Admin\Install
|
* @package Modules\Media\Admin\Install
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
class Navigation
|
class Navigation
|
||||||
{
|
{
|
||||||
|
|
@ -34,7 +34,7 @@ class Navigation
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public static function install(string $path, DatabasePool $dbPool) : void
|
public static function install(string $path, DatabasePool $dbPool) : void
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,11 @@
|
||||||
*
|
*
|
||||||
* PHP Version 7.4
|
* PHP Version 7.4
|
||||||
*
|
*
|
||||||
* @package Modules\Media\Admin
|
* @package Modules\Media\Admin
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
|
@ -24,10 +24,10 @@ use phpOMS\System\File\PathException;
|
||||||
/**
|
/**
|
||||||
* Installer class.
|
* Installer class.
|
||||||
*
|
*
|
||||||
* @package Modules\Media\Admin
|
* @package Modules\Media\Admin
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
class Installer extends InstallerAbstract
|
class Installer extends InstallerAbstract
|
||||||
{
|
{
|
||||||
|
|
@ -42,7 +42,7 @@ class Installer extends InstallerAbstract
|
||||||
* @throws PathException This exception is thrown if the Navigation install file couldn't be found
|
* @throws PathException This exception is thrown if the Navigation install file couldn't be found
|
||||||
* @throws \Exception This exception is thrown if the Navigation install file is invalid json
|
* @throws \Exception This exception is thrown if the Navigation install file is invalid json
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public static function installExternal(DatabasePool $dbPool, array $data) : void
|
public static function installExternal(DatabasePool $dbPool, array $data) : void
|
||||||
{
|
{
|
||||||
|
|
@ -77,7 +77,7 @@ class Installer extends InstallerAbstract
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private static function installMedia($dbPool, $data) : void
|
private static function installMedia($dbPool, $data) : void
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,11 @@
|
||||||
*
|
*
|
||||||
* PHP Version 7.4
|
* PHP Version 7.4
|
||||||
*
|
*
|
||||||
* @package Modules\Media\Admin
|
* @package Modules\Media\Admin
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
|
@ -19,10 +19,10 @@ use phpOMS\Module\StatusAbstract;
|
||||||
/**
|
/**
|
||||||
* Navigation class.
|
* Navigation class.
|
||||||
*
|
*
|
||||||
* @package Modules\Media\Admin
|
* @package Modules\Media\Admin
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
class Status extends StatusAbstract
|
class Status extends StatusAbstract
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,11 @@
|
||||||
*
|
*
|
||||||
* PHP Version 7.4
|
* PHP Version 7.4
|
||||||
*
|
*
|
||||||
* @package Modules\Media\Admin
|
* @package Modules\Media\Admin
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
|
@ -19,10 +19,10 @@ use phpOMS\Module\UninstallerAbstract;
|
||||||
/**
|
/**
|
||||||
* Uninstaller class.
|
* Uninstaller class.
|
||||||
*
|
*
|
||||||
* @package Modules\Media\Admin
|
* @package Modules\Media\Admin
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
class Uninstaller extends UninstallerAbstract
|
class Uninstaller extends UninstallerAbstract
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,11 @@
|
||||||
*
|
*
|
||||||
* PHP Version 7.4
|
* PHP Version 7.4
|
||||||
*
|
*
|
||||||
* @package Modules\Media\Admin
|
* @package Modules\Media\Admin
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
|
@ -19,10 +19,10 @@ use phpOMS\Module\UpdaterAbstract;
|
||||||
/**
|
/**
|
||||||
* Updater class.
|
* Updater class.
|
||||||
*
|
*
|
||||||
* @package Modules\Media\Admin
|
* @package Modules\Media\Admin
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
class Updater extends UpdaterAbstract
|
class Updater extends UpdaterAbstract
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,11 @@
|
||||||
*
|
*
|
||||||
* PHP Version 7.4
|
* PHP Version 7.4
|
||||||
*
|
*
|
||||||
* @package Modules\Media
|
* @package Modules\Media
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
|
@ -30,10 +30,10 @@ use phpOMS\System\MimeType;
|
||||||
/**
|
/**
|
||||||
* Media class.
|
* Media class.
|
||||||
*
|
*
|
||||||
* @package Modules\Media
|
* @package Modules\Media
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
final class ApiController extends Controller
|
final class ApiController extends Controller
|
||||||
{
|
{
|
||||||
|
|
@ -49,7 +49,7 @@ final class ApiController extends Controller
|
||||||
*
|
*
|
||||||
* @api
|
* @api
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function apiMediaFind(RequestAbstract $request, ResponseAbstract $response, $data = null) : void
|
public function apiMediaFind(RequestAbstract $request, ResponseAbstract $response, $data = null) : void
|
||||||
{
|
{
|
||||||
|
|
@ -73,7 +73,7 @@ final class ApiController extends Controller
|
||||||
*
|
*
|
||||||
* @api
|
* @api
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function apiMediaUpload(RequestAbstract $request, ResponseAbstract $response, $data = null) : void
|
public function apiMediaUpload(RequestAbstract $request, ResponseAbstract $response, $data = null) : void
|
||||||
{
|
{
|
||||||
|
|
@ -102,7 +102,7 @@ final class ApiController extends Controller
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function uploadFiles(
|
public function uploadFiles(
|
||||||
string $name,
|
string $name,
|
||||||
|
|
@ -132,7 +132,7 @@ final class ApiController extends Controller
|
||||||
*
|
*
|
||||||
* @return string Random path to store media files
|
* @return string Random path to store media files
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public static function createMediaPath(string $basePath = 'Modules/Media/Files') : string
|
public static function createMediaPath(string $basePath = 'Modules/Media/Files') : string
|
||||||
{
|
{
|
||||||
|
|
@ -146,7 +146,7 @@ final class ApiController extends Controller
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function createDbEntries(array $status, int $account, string $virtualPath = '/') : array
|
public function createDbEntries(array $status, int $account, string $virtualPath = '/') : array
|
||||||
{
|
{
|
||||||
|
|
@ -221,7 +221,7 @@ final class ApiController extends Controller
|
||||||
*
|
*
|
||||||
* @api
|
* @api
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function apiMediaUpdate(RequestAbstract $request, ResponseAbstract $response, $data = null) : void
|
public function apiMediaUpdate(RequestAbstract $request, ResponseAbstract $response, $data = null) : void
|
||||||
{
|
{
|
||||||
|
|
@ -238,7 +238,7 @@ final class ApiController extends Controller
|
||||||
*
|
*
|
||||||
* @return Media
|
* @return Media
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private function updateMediaFromRequest(RequestAbstract $request) : Media
|
private function updateMediaFromRequest(RequestAbstract $request) : Media
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Orange Management
|
* Orange Management
|
||||||
*
|
*
|
||||||
|
|
@ -8,7 +7,7 @@
|
||||||
* @package Modules\Media
|
* @package Modules\Media
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version GIT: <git_id>$Id$
|
* @version 1.0.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
@ -29,10 +28,10 @@ use phpOMS\Views\View;
|
||||||
/**
|
/**
|
||||||
* Media class.
|
* Media class.
|
||||||
*
|
*
|
||||||
* @package Modules\Media
|
* @package Modules\Media
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
final class BackendController extends Controller
|
final class BackendController extends Controller
|
||||||
{
|
{
|
||||||
|
|
@ -40,7 +39,7 @@ final class BackendController extends Controller
|
||||||
/**
|
/**
|
||||||
* Module path.
|
* Module path.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public const MODULE_PATH = __DIR__;
|
public const MODULE_PATH = __DIR__;
|
||||||
|
|
@ -48,7 +47,7 @@ final class BackendController extends Controller
|
||||||
/**
|
/**
|
||||||
* Module version.
|
* Module version.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public const MODULE_VERSION = '1.0.0';
|
public const MODULE_VERSION = '1.0.0';
|
||||||
|
|
@ -56,7 +55,7 @@ final class BackendController extends Controller
|
||||||
/**
|
/**
|
||||||
* Module name.
|
* Module name.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public const MODULE_NAME = 'Media';
|
public const MODULE_NAME = 'Media';
|
||||||
|
|
@ -64,7 +63,7 @@ final class BackendController extends Controller
|
||||||
/**
|
/**
|
||||||
* Module id.
|
* Module id.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public const MODULE_ID = 1000400000;
|
public const MODULE_ID = 1000400000;
|
||||||
|
|
@ -72,7 +71,7 @@ final class BackendController extends Controller
|
||||||
/**
|
/**
|
||||||
* Providing.
|
* Providing.
|
||||||
*
|
*
|
||||||
* @var string[]
|
* @var string[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static array $providing = [];
|
protected static array $providing = [];
|
||||||
|
|
@ -80,19 +79,21 @@ final class BackendController extends Controller
|
||||||
/**
|
/**
|
||||||
* Dependencies.
|
* Dependencies.
|
||||||
*
|
*
|
||||||
* @var string[]
|
* @var string[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static array $dependencies = [];
|
protected static array $dependencies = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Routing end-point for application behaviour.
|
||||||
|
*
|
||||||
* @param RequestAbstract $request Request
|
* @param RequestAbstract $request Request
|
||||||
* @param ResponseAbstract $response Response
|
* @param ResponseAbstract $response Response
|
||||||
* @param mixed $data Generic data
|
* @param mixed $data Generic data
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
*/
|
*/
|
||||||
public static function setUpFileUploader(RequestAbstract $request, ResponseAbstract $response, $data = null) : void
|
public static function setUpFileUploader(RequestAbstract $request, ResponseAbstract $response, $data = null) : void
|
||||||
|
|
@ -103,13 +104,15 @@ final class BackendController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Routing end-point for application behaviour.
|
||||||
|
*
|
||||||
* @param RequestAbstract $request Request
|
* @param RequestAbstract $request Request
|
||||||
* @param ResponseAbstract $response Response
|
* @param ResponseAbstract $response Response
|
||||||
* @param mixed $data Generic data
|
* @param mixed $data Generic data
|
||||||
*
|
*
|
||||||
* @return RenderableInterface
|
* @return RenderableInterface
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
*/
|
*/
|
||||||
public function viewMediaList(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
|
public function viewMediaList(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
|
||||||
|
|
@ -125,13 +128,15 @@ final class BackendController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Routing end-point for application behaviour.
|
||||||
|
*
|
||||||
* @param RequestAbstract $request Request
|
* @param RequestAbstract $request Request
|
||||||
* @param ResponseAbstract $response Response
|
* @param ResponseAbstract $response Response
|
||||||
* @param mixed $data Generic data
|
* @param mixed $data Generic data
|
||||||
*
|
*
|
||||||
* @return RenderableInterface
|
* @return RenderableInterface
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
*/
|
*/
|
||||||
public function viewMediaSingle(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
|
public function viewMediaSingle(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
|
||||||
|
|
@ -160,13 +165,15 @@ final class BackendController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Routing end-point for application behaviour.
|
||||||
|
*
|
||||||
* @param RequestAbstract $request Request
|
* @param RequestAbstract $request Request
|
||||||
* @param ResponseAbstract $response Response
|
* @param ResponseAbstract $response Response
|
||||||
* @param mixed $data Generic data
|
* @param mixed $data Generic data
|
||||||
*
|
*
|
||||||
* @return RenderableInterface
|
* @return RenderableInterface
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
*/
|
*/
|
||||||
public function viewMediaCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
|
public function viewMediaCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,11 @@
|
||||||
*
|
*
|
||||||
* PHP Version 7.4
|
* PHP Version 7.4
|
||||||
*
|
*
|
||||||
* @package Modules\Media
|
* @package Modules\Media
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
|
@ -20,10 +20,10 @@ use phpOMS\Module\WebInterface;
|
||||||
/**
|
/**
|
||||||
* Media class.
|
* Media class.
|
||||||
*
|
*
|
||||||
* @package Modules\Media
|
* @package Modules\Media
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
class Controller extends ModuleAbstract implements WebInterface
|
class Controller extends ModuleAbstract implements WebInterface
|
||||||
{
|
{
|
||||||
|
|
@ -31,7 +31,7 @@ class Controller extends ModuleAbstract implements WebInterface
|
||||||
/**
|
/**
|
||||||
* Module path.
|
* Module path.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public const MODULE_PATH = __DIR__ . '/../';
|
public const MODULE_PATH = __DIR__ . '/../';
|
||||||
|
|
@ -39,7 +39,7 @@ class Controller extends ModuleAbstract implements WebInterface
|
||||||
/**
|
/**
|
||||||
* Module version.
|
* Module version.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public const MODULE_VERSION = '1.0.0';
|
public const MODULE_VERSION = '1.0.0';
|
||||||
|
|
@ -47,7 +47,7 @@ class Controller extends ModuleAbstract implements WebInterface
|
||||||
/**
|
/**
|
||||||
* Module name.
|
* Module name.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public const MODULE_NAME = 'Media';
|
public const MODULE_NAME = 'Media';
|
||||||
|
|
@ -55,7 +55,7 @@ class Controller extends ModuleAbstract implements WebInterface
|
||||||
/**
|
/**
|
||||||
* Module id.
|
* Module id.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public const MODULE_ID = 1000400000;
|
public const MODULE_ID = 1000400000;
|
||||||
|
|
@ -63,7 +63,7 @@ class Controller extends ModuleAbstract implements WebInterface
|
||||||
/**
|
/**
|
||||||
* Providing.
|
* Providing.
|
||||||
*
|
*
|
||||||
* @var string[]
|
* @var string[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static array $providing = [];
|
protected static array $providing = [];
|
||||||
|
|
@ -71,7 +71,7 @@ class Controller extends ModuleAbstract implements WebInterface
|
||||||
/**
|
/**
|
||||||
* Dependencies.
|
* Dependencies.
|
||||||
*
|
*
|
||||||
* @var string[]
|
* @var string[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static array $dependencies = [];
|
protected static array $dependencies = [];
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,11 @@
|
||||||
*
|
*
|
||||||
* PHP Version 7.4
|
* PHP Version 7.4
|
||||||
*
|
*
|
||||||
* @package Modules\Media\Models
|
* @package Modules\Media\Models
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
|
@ -17,10 +17,10 @@ namespace Modules\Media\Models;
|
||||||
/**
|
/**
|
||||||
* Media class.
|
* Media class.
|
||||||
*
|
*
|
||||||
* @package Modules\Media\Models
|
* @package Modules\Media\Models
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
class Collection extends Media implements \Iterator
|
class Collection extends Media implements \Iterator
|
||||||
{
|
{
|
||||||
|
|
@ -28,7 +28,7 @@ class Collection extends Media implements \Iterator
|
||||||
/**
|
/**
|
||||||
* Resource id.
|
* Resource id.
|
||||||
*
|
*
|
||||||
* @var array<int|Media>
|
* @var array<int|Media>
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private $sources = [];
|
private $sources = [];
|
||||||
|
|
@ -36,7 +36,7 @@ class Collection extends Media implements \Iterator
|
||||||
/**
|
/**
|
||||||
* Extension name.
|
* Extension name.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected string $extension = 'collection';
|
protected string $extension = 'collection';
|
||||||
|
|
@ -44,7 +44,7 @@ class Collection extends Media implements \Iterator
|
||||||
/**
|
/**
|
||||||
* Versioned.
|
* Versioned.
|
||||||
*
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected bool $versioned = false;
|
protected bool $versioned = false;
|
||||||
|
|
@ -56,7 +56,7 @@ class Collection extends Media implements \Iterator
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function setSources(array $sources) : void
|
public function setSources(array $sources) : void
|
||||||
{
|
{
|
||||||
|
|
@ -70,7 +70,7 @@ class Collection extends Media implements \Iterator
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function addSource($source) : void
|
public function addSource($source) : void
|
||||||
{
|
{
|
||||||
|
|
@ -82,7 +82,7 @@ class Collection extends Media implements \Iterator
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function getSources() : array
|
public function getSources() : array
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,11 @@
|
||||||
*
|
*
|
||||||
* PHP Version 7.4
|
* PHP Version 7.4
|
||||||
*
|
*
|
||||||
* @package Modules\Media
|
* @package Modules\Media
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
|
@ -17,17 +17,17 @@ namespace Modules\Media\Models;
|
||||||
/**
|
/**
|
||||||
* Mapper class.
|
* Mapper class.
|
||||||
*
|
*
|
||||||
* @package Modules\Media
|
* @package Modules\Media
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
final class CollectionMapper extends MediaMapper
|
final class CollectionMapper extends MediaMapper
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Has many relation.
|
* Has many relation.
|
||||||
*
|
*
|
||||||
* @var array<string, array<string, null|string>>
|
* @var array<string, array<string, null|string>>
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static array $hasMany = [
|
protected static array $hasMany = [
|
||||||
|
|
@ -42,7 +42,7 @@ final class CollectionMapper extends MediaMapper
|
||||||
/**
|
/**
|
||||||
* Primary table.
|
* Primary table.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static string $table = 'media';
|
protected static string $table = 'media';
|
||||||
|
|
@ -50,7 +50,7 @@ final class CollectionMapper extends MediaMapper
|
||||||
/**
|
/**
|
||||||
* Created at.
|
* Created at.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static string $createdAt = 'media_created_at';
|
protected static string $createdAt = 'media_created_at';
|
||||||
|
|
@ -58,7 +58,7 @@ final class CollectionMapper extends MediaMapper
|
||||||
/**
|
/**
|
||||||
* Primary field name.
|
* Primary field name.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static string $primaryField = 'media_id';
|
protected static string $primaryField = 'media_id';
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,9 @@
|
||||||
*
|
*
|
||||||
* PHP Version 7.4
|
* PHP Version 7.4
|
||||||
*
|
*
|
||||||
* @package TBD
|
* @package TBD
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
*/ // TODO: implement file storage interface
|
*/ // TODO: implement file storage interface
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,11 @@
|
||||||
*
|
*
|
||||||
* PHP Version 7.4
|
* PHP Version 7.4
|
||||||
*
|
*
|
||||||
* @package Modules\Media\Models
|
* @package Modules\Media\Models
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
|
@ -36,7 +36,7 @@ trait FileUploaderTrait
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function setUpFileUploader(RequestAbstract $request, ResponseAbstract $response, $data = null) : void
|
public function setUpFileUploader(RequestAbstract $request, ResponseAbstract $response, $data = null) : void
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,9 @@
|
||||||
*
|
*
|
||||||
* PHP Version 7.4
|
* PHP Version 7.4
|
||||||
*
|
*
|
||||||
* @package TBD
|
* @package TBD
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
*/ // TODO: implement filestorage on remote ftp server
|
*/ // TODO: implement filestorage on remote ftp server
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,9 @@
|
||||||
*
|
*
|
||||||
* PHP Version 7.4
|
* PHP Version 7.4
|
||||||
*
|
*
|
||||||
* @package TBD
|
* @package TBD
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
*/ // TODO: implement local file storage
|
*/ // TODO: implement local file storage
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,11 @@
|
||||||
*
|
*
|
||||||
* PHP Version 7.4
|
* PHP Version 7.4
|
||||||
*
|
*
|
||||||
* @package Modules\Media\Models
|
* @package Modules\Media\Models
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
|
@ -17,10 +17,10 @@ namespace Modules\Media\Models;
|
||||||
/**
|
/**
|
||||||
* Media class.
|
* Media class.
|
||||||
*
|
*
|
||||||
* @package Modules\Media\Models
|
* @package Modules\Media\Models
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
class Media implements \JsonSerializable
|
class Media implements \JsonSerializable
|
||||||
{
|
{
|
||||||
|
|
@ -28,7 +28,7 @@ class Media implements \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* ID.
|
* ID.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected int $id = 0;
|
protected int $id = 0;
|
||||||
|
|
@ -36,7 +36,7 @@ class Media implements \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Name.
|
* Name.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected string $name = '';
|
protected string $name = '';
|
||||||
|
|
@ -44,7 +44,7 @@ class Media implements \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Extension.
|
* Extension.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected string $extension = '';
|
protected string $extension = '';
|
||||||
|
|
@ -52,7 +52,7 @@ class Media implements \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* File size in bytes.
|
* File size in bytes.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected int $size = 0;
|
protected int $size = 0;
|
||||||
|
|
@ -60,7 +60,7 @@ class Media implements \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Author.
|
* Author.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected $createdBy = 0;
|
protected $createdBy = 0;
|
||||||
|
|
@ -68,7 +68,7 @@ class Media implements \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Uploaded.
|
* Uploaded.
|
||||||
*
|
*
|
||||||
* @var null|\DateTime
|
* @var null|\DateTime
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected ?\DateTime $createdAt = null;
|
protected ?\DateTime $createdAt = null;
|
||||||
|
|
@ -76,7 +76,7 @@ class Media implements \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Resource path.
|
* Resource path.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected string $path = '';
|
protected string $path = '';
|
||||||
|
|
@ -84,7 +84,7 @@ class Media implements \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Virtual path.
|
* Virtual path.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected string $virtualPath = '/';
|
protected string $virtualPath = '/';
|
||||||
|
|
@ -92,7 +92,7 @@ class Media implements \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Is path absolute?
|
* Is path absolute?
|
||||||
*
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected bool $isAbsolute = false;
|
protected bool $isAbsolute = false;
|
||||||
|
|
@ -100,7 +100,7 @@ class Media implements \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Is versioned.
|
* Is versioned.
|
||||||
*
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected bool $versioned = false;
|
protected bool $versioned = false;
|
||||||
|
|
@ -108,7 +108,7 @@ class Media implements \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Media Description.
|
* Media Description.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected string $description = '';
|
protected string $description = '';
|
||||||
|
|
@ -117,7 +117,7 @@ class Media implements \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
|
|
@ -127,7 +127,7 @@ class Media implements \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* @return int
|
* @return int
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function getId() : int
|
public function getId() : int
|
||||||
{
|
{
|
||||||
|
|
@ -137,7 +137,7 @@ class Media implements \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* @return bool
|
* @return bool
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function isAbsolute() : bool
|
public function isAbsolute() : bool
|
||||||
{
|
{
|
||||||
|
|
@ -147,7 +147,7 @@ class Media implements \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function setAbsolute(bool $absolute) : void
|
public function setAbsolute(bool $absolute) : void
|
||||||
{
|
{
|
||||||
|
|
@ -157,7 +157,7 @@ class Media implements \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* @return int|\phpOMS\Account\Account
|
* @return int|\phpOMS\Account\Account
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function getCreatedBy()
|
public function getCreatedBy()
|
||||||
{
|
{
|
||||||
|
|
@ -167,7 +167,7 @@ class Media implements \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* @return \DateTime
|
* @return \DateTime
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function getCreatedAt() : \DateTime
|
public function getCreatedAt() : \DateTime
|
||||||
{
|
{
|
||||||
|
|
@ -177,7 +177,7 @@ class Media implements \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function getExtension() : string
|
public function getExtension() : string
|
||||||
{
|
{
|
||||||
|
|
@ -187,7 +187,7 @@ class Media implements \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function getPath() : string
|
public function getPath() : string
|
||||||
{
|
{
|
||||||
|
|
@ -197,7 +197,7 @@ class Media implements \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function getVirtualPath() : string
|
public function getVirtualPath() : string
|
||||||
{
|
{
|
||||||
|
|
@ -207,7 +207,7 @@ class Media implements \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function getName() : string
|
public function getName() : string
|
||||||
{
|
{
|
||||||
|
|
@ -217,7 +217,7 @@ class Media implements \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function getDescription() : string
|
public function getDescription() : string
|
||||||
{
|
{
|
||||||
|
|
@ -227,7 +227,7 @@ class Media implements \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function getDescriptionRaw() : string
|
public function getDescriptionRaw() : string
|
||||||
{
|
{
|
||||||
|
|
@ -237,7 +237,7 @@ class Media implements \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* @return int
|
* @return int
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function getSize() : int
|
public function getSize() : int
|
||||||
{
|
{
|
||||||
|
|
@ -247,7 +247,7 @@ class Media implements \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* @return bool
|
* @return bool
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function isVersioned() : bool
|
public function isVersioned() : bool
|
||||||
{
|
{
|
||||||
|
|
@ -259,7 +259,7 @@ class Media implements \JsonSerializable
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function setCreatedBy($createdBy) : void
|
public function setCreatedBy($createdBy) : void
|
||||||
{
|
{
|
||||||
|
|
@ -271,7 +271,7 @@ class Media implements \JsonSerializable
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function setExtension(string $extension) : void
|
public function setExtension(string $extension) : void
|
||||||
{
|
{
|
||||||
|
|
@ -283,7 +283,7 @@ class Media implements \JsonSerializable
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function setPath(string $path) : void
|
public function setPath(string $path) : void
|
||||||
{
|
{
|
||||||
|
|
@ -295,7 +295,7 @@ class Media implements \JsonSerializable
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function setVirtualPath(string $path) : void
|
public function setVirtualPath(string $path) : void
|
||||||
{
|
{
|
||||||
|
|
@ -307,7 +307,7 @@ class Media implements \JsonSerializable
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function setName(string $name) : void
|
public function setName(string $name) : void
|
||||||
{
|
{
|
||||||
|
|
@ -319,7 +319,7 @@ class Media implements \JsonSerializable
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function setDescription(string $description) : void
|
public function setDescription(string $description) : void
|
||||||
{
|
{
|
||||||
|
|
@ -331,7 +331,7 @@ class Media implements \JsonSerializable
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function setDescriptionRaw(string $description) : void
|
public function setDescriptionRaw(string $description) : void
|
||||||
{
|
{
|
||||||
|
|
@ -343,7 +343,7 @@ class Media implements \JsonSerializable
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function setSize(int $size) : void
|
public function setSize(int $size) : void
|
||||||
{
|
{
|
||||||
|
|
@ -355,7 +355,7 @@ class Media implements \JsonSerializable
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function setVersioned(bool $versioned) : void
|
public function setVersioned(bool $versioned) : void
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,11 @@
|
||||||
*
|
*
|
||||||
* PHP Version 7.4
|
* PHP Version 7.4
|
||||||
*
|
*
|
||||||
* @package Modules\Media\Models
|
* @package Modules\Media\Models
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
|
@ -20,10 +20,10 @@ use phpOMS\DataStorage\Database\DataMapperAbstract;
|
||||||
/**
|
/**
|
||||||
* Media mapper class.
|
* Media mapper class.
|
||||||
*
|
*
|
||||||
* @package Modules\Media\Models
|
* @package Modules\Media\Models
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
class MediaMapper extends DataMapperAbstract
|
class MediaMapper extends DataMapperAbstract
|
||||||
{
|
{
|
||||||
|
|
@ -31,7 +31,7 @@ class MediaMapper extends DataMapperAbstract
|
||||||
/**
|
/**
|
||||||
* Columns.
|
* Columns.
|
||||||
*
|
*
|
||||||
* @var array<string, array<string, bool|string>>
|
* @var array<string, array<string, bool|string>>
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
* @todo: maybe add file name for searching by file name (path in media_file should not matter for search)
|
* @todo: maybe add file name for searching by file name (path in media_file should not matter for search)
|
||||||
*/
|
*/
|
||||||
|
|
@ -53,7 +53,7 @@ class MediaMapper extends DataMapperAbstract
|
||||||
/**
|
/**
|
||||||
* Belongs to.
|
* Belongs to.
|
||||||
*
|
*
|
||||||
* @var array<string, array<string, string>>
|
* @var array<string, array<string, string>>
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static array $belongsTo = [
|
protected static array $belongsTo = [
|
||||||
|
|
@ -66,7 +66,7 @@ class MediaMapper extends DataMapperAbstract
|
||||||
/**
|
/**
|
||||||
* Primary table.
|
* Primary table.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static string $table = 'media';
|
protected static string $table = 'media';
|
||||||
|
|
@ -74,7 +74,7 @@ class MediaMapper extends DataMapperAbstract
|
||||||
/**
|
/**
|
||||||
* Created at.
|
* Created at.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static string $createdAt = 'media_created_at';
|
protected static string $createdAt = 'media_created_at';
|
||||||
|
|
@ -82,7 +82,7 @@ class MediaMapper extends DataMapperAbstract
|
||||||
/**
|
/**
|
||||||
* Primary field name.
|
* Primary field name.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static string $primaryField = 'media_id';
|
protected static string $primaryField = 'media_id';
|
||||||
|
|
@ -106,7 +106,7 @@ class MediaMapper extends DataMapperAbstract
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public static function getByVirtualPath(string $virtualPath = '/') : array
|
public static function getByVirtualPath(string $virtualPath = '/') : array
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,11 @@
|
||||||
*
|
*
|
||||||
* PHP Version 7.4
|
* PHP Version 7.4
|
||||||
*
|
*
|
||||||
* @package Modules\Media\Models
|
* @package Modules\Media\Models
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
|
@ -17,10 +17,10 @@ namespace Modules\Media\Models;
|
||||||
/**
|
/**
|
||||||
* Media class.
|
* Media class.
|
||||||
*
|
*
|
||||||
* @package Modules\Media\Models
|
* @package Modules\Media\Models
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
class NullCollection extends Collection
|
class NullCollection extends Collection
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,11 @@
|
||||||
*
|
*
|
||||||
* PHP Version 7.4
|
* PHP Version 7.4
|
||||||
*
|
*
|
||||||
* @package Modules\Media\Models
|
* @package Modules\Media\Models
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
|
@ -17,10 +17,10 @@ namespace Modules\Media\Models;
|
||||||
/**
|
/**
|
||||||
* Media class.
|
* Media class.
|
||||||
*
|
*
|
||||||
* @package Modules\Media\Models
|
* @package Modules\Media\Models
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
class NullMedia extends Media
|
class NullMedia extends Media
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,11 @@
|
||||||
*
|
*
|
||||||
* PHP Version 7.4
|
* PHP Version 7.4
|
||||||
*
|
*
|
||||||
* @package Modules\Media
|
* @package Modules\Media
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
|
@ -19,10 +19,10 @@ use phpOMS\Stdlib\Base\Enum;
|
||||||
/**
|
/**
|
||||||
* Permision state enum.
|
* Permision state enum.
|
||||||
*
|
*
|
||||||
* @package Modules\Media
|
* @package Modules\Media
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
abstract class PermissionState extends Enum
|
abstract class PermissionState extends Enum
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ export class Upload {
|
||||||
*
|
*
|
||||||
* @return {void}
|
* @return {void}
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
setMaxFileSize (size)
|
setMaxFileSize (size)
|
||||||
{
|
{
|
||||||
|
|
@ -49,7 +49,7 @@ export class Upload {
|
||||||
*
|
*
|
||||||
* @return {int} Max file size
|
* @return {int} Max file size
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
getMaxFileSize ()
|
getMaxFileSize ()
|
||||||
{
|
{
|
||||||
|
|
@ -64,7 +64,7 @@ export class Upload {
|
||||||
*
|
*
|
||||||
* @return {void}
|
* @return {void}
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
setSuccess (id, callback)
|
setSuccess (id, callback)
|
||||||
{
|
{
|
||||||
|
|
@ -78,7 +78,7 @@ export class Upload {
|
||||||
*
|
*
|
||||||
* @return {void}
|
* @return {void}
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
setUri (uri)
|
setUri (uri)
|
||||||
{
|
{
|
||||||
|
|
@ -92,7 +92,7 @@ export class Upload {
|
||||||
*
|
*
|
||||||
* @return {void}
|
* @return {void}
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
setAllowedTypes (allowed)
|
setAllowedTypes (allowed)
|
||||||
{
|
{
|
||||||
|
|
@ -106,7 +106,7 @@ export class Upload {
|
||||||
*
|
*
|
||||||
* @return {void}
|
* @return {void}
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
addAllowedType (allowed)
|
addAllowedType (allowed)
|
||||||
{
|
{
|
||||||
|
|
@ -120,7 +120,7 @@ export class Upload {
|
||||||
*
|
*
|
||||||
* @return {void}
|
* @return {void}
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
addFile (file)
|
addFile (file)
|
||||||
{
|
{
|
||||||
|
|
@ -132,7 +132,7 @@ export class Upload {
|
||||||
*
|
*
|
||||||
* @return {int}
|
* @return {int}
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
count ()
|
count ()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,11 @@
|
||||||
*
|
*
|
||||||
* PHP Version 7.4
|
* PHP Version 7.4
|
||||||
*
|
*
|
||||||
* @package Modules\Media\Models
|
* @package Modules\Media\Models
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
|
@ -20,10 +20,10 @@ use phpOMS\System\File\Local\Directory;
|
||||||
/**
|
/**
|
||||||
* Upload.
|
* Upload.
|
||||||
*
|
*
|
||||||
* @package Modules\Media\Models
|
* @package Modules\Media\Models
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
*/
|
*/
|
||||||
class UploadFile
|
class UploadFile
|
||||||
|
|
@ -31,7 +31,7 @@ class UploadFile
|
||||||
/**
|
/**
|
||||||
* Limit of iterations to find a possible random path for the file to upload to.
|
* Limit of iterations to find a possible random path for the file to upload to.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private const PATH_GENERATION_LIMIT = 1000;
|
private const PATH_GENERATION_LIMIT = 1000;
|
||||||
|
|
@ -39,7 +39,7 @@ class UploadFile
|
||||||
/**
|
/**
|
||||||
* Image interlaced.
|
* Image interlaced.
|
||||||
*
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private bool $isInterlaced = true;
|
private bool $isInterlaced = true;
|
||||||
|
|
@ -47,7 +47,7 @@ class UploadFile
|
||||||
/**
|
/**
|
||||||
* Upload max size.
|
* Upload max size.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private int $maxSize = 50000000;
|
private int $maxSize = 50000000;
|
||||||
|
|
@ -55,7 +55,7 @@ class UploadFile
|
||||||
/**
|
/**
|
||||||
* Allowed mime types.
|
* Allowed mime types.
|
||||||
*
|
*
|
||||||
* @var string[]
|
* @var string[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private $allowedTypes = [];
|
private $allowedTypes = [];
|
||||||
|
|
@ -63,7 +63,7 @@ class UploadFile
|
||||||
/**
|
/**
|
||||||
* Output directory.
|
* Output directory.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private string $outputDir = __DIR__ . '/../../Modules/Media/Files';
|
private string $outputDir = __DIR__ . '/../../Modules/Media/Files';
|
||||||
|
|
@ -71,7 +71,7 @@ class UploadFile
|
||||||
/**
|
/**
|
||||||
* Output file name.
|
* Output file name.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private string $fileName = '';
|
private string $fileName = '';
|
||||||
|
|
@ -79,7 +79,7 @@ class UploadFile
|
||||||
/**
|
/**
|
||||||
* Output file name.
|
* Output file name.
|
||||||
*
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private bool $preserveFileName = true;
|
private bool $preserveFileName = true;
|
||||||
|
|
@ -95,7 +95,7 @@ class UploadFile
|
||||||
*
|
*
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function upload(array $files, string $name = '', string $encoding = 'UTF-8') : array
|
public function upload(array $files, string $name = '', string $encoding = 'UTF-8') : array
|
||||||
{
|
{
|
||||||
|
|
@ -206,7 +206,7 @@ class UploadFile
|
||||||
*
|
*
|
||||||
* @throws \Exception This exception is thrown if the file couldn't be created
|
* @throws \Exception This exception is thrown if the file couldn't be created
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private function createFileName(string $path, string $tempName, string $extension) : string
|
private function createFileName(string $path, string $tempName, string $extension) : string
|
||||||
{
|
{
|
||||||
|
|
@ -241,7 +241,7 @@ class UploadFile
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private function interlace(string $extension, string $path) : void
|
private function interlace(string $extension, string $path) : void
|
||||||
{
|
{
|
||||||
|
|
@ -277,7 +277,7 @@ class UploadFile
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private function findOutputDir(array $files) : string
|
private function findOutputDir(array $files) : string
|
||||||
{
|
{
|
||||||
|
|
@ -295,7 +295,7 @@ class UploadFile
|
||||||
*
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private function getUploadError($error) : int
|
private function getUploadError($error) : int
|
||||||
{
|
{
|
||||||
|
|
@ -314,7 +314,7 @@ class UploadFile
|
||||||
/**
|
/**
|
||||||
* @return int
|
* @return int
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function getMaxSize() : int
|
public function getMaxSize() : int
|
||||||
{
|
{
|
||||||
|
|
@ -326,7 +326,7 @@ class UploadFile
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function setInterlaced(bool $isInterlaced) : void
|
public function setInterlaced(bool $isInterlaced) : void
|
||||||
{
|
{
|
||||||
|
|
@ -338,7 +338,7 @@ class UploadFile
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function setMaxSize(int $maxSize) : void
|
public function setMaxSize(int $maxSize) : void
|
||||||
{
|
{
|
||||||
|
|
@ -348,7 +348,7 @@ class UploadFile
|
||||||
/**
|
/**
|
||||||
* @return string[]
|
* @return string[]
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function getAllowedTypes() : array
|
public function getAllowedTypes() : array
|
||||||
{
|
{
|
||||||
|
|
@ -360,7 +360,7 @@ class UploadFile
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function setAllowedTypes(array $allowedTypes) : void
|
public function setAllowedTypes(array $allowedTypes) : void
|
||||||
{
|
{
|
||||||
|
|
@ -372,7 +372,7 @@ class UploadFile
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function addAllowedTypes(string $allowedTypes) : void
|
public function addAllowedTypes(string $allowedTypes) : void
|
||||||
{
|
{
|
||||||
|
|
@ -382,7 +382,7 @@ class UploadFile
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function getOutputDir() : string
|
public function getOutputDir() : string
|
||||||
{
|
{
|
||||||
|
|
@ -396,7 +396,7 @@ class UploadFile
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function setOutputDir(string $outputDir) : void
|
public function setOutputDir(string $outputDir) : void
|
||||||
{
|
{
|
||||||
|
|
@ -406,7 +406,7 @@ class UploadFile
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function getFileName() : string
|
public function getFileName() : string
|
||||||
{
|
{
|
||||||
|
|
@ -420,7 +420,7 @@ class UploadFile
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function setFileName(string $fileName) : void
|
public function setFileName(string $fileName) : void
|
||||||
{
|
{
|
||||||
|
|
@ -434,7 +434,7 @@ class UploadFile
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function setPreserveFileName(bool $preserveFileName) : void
|
public function setPreserveFileName(bool $preserveFileName) : void
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,11 @@
|
||||||
*
|
*
|
||||||
* PHP Version 7.4
|
* PHP Version 7.4
|
||||||
*
|
*
|
||||||
* @package Modules\Media\Models
|
* @package Modules\Media\Models
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
|
@ -19,10 +19,10 @@ use phpOMS\Stdlib\Base\Enum;
|
||||||
/**
|
/**
|
||||||
* Upload status.
|
* Upload status.
|
||||||
*
|
*
|
||||||
* @package Modules\Media\Models
|
* @package Modules\Media\Models
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
abstract class UploadStatus extends Enum
|
abstract class UploadStatus extends Enum
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,11 @@
|
||||||
*
|
*
|
||||||
* PHP Version 7.4
|
* PHP Version 7.4
|
||||||
*
|
*
|
||||||
* @package TBD
|
* @package TBD
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
|
@ -22,10 +22,10 @@ use phpOMS\Views\View;
|
||||||
/**
|
/**
|
||||||
* Component view.
|
* Component view.
|
||||||
*
|
*
|
||||||
* @package TBD
|
* @package TBD
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
*/
|
*/
|
||||||
class BaseView extends View
|
class BaseView extends View
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,11 @@
|
||||||
*
|
*
|
||||||
* PHP Version 7.4
|
* PHP Version 7.4
|
||||||
*
|
*
|
||||||
* @package TBD
|
* @package TBD
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
|
@ -22,10 +22,10 @@ use phpOMS\Views\View;
|
||||||
/**
|
/**
|
||||||
* Component view.
|
* Component view.
|
||||||
*
|
*
|
||||||
* @package TBD
|
* @package TBD
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
*/
|
*/
|
||||||
class BaseView extends View
|
class BaseView extends View
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,11 @@
|
||||||
*
|
*
|
||||||
* PHP Version 7.4
|
* PHP Version 7.4
|
||||||
*
|
*
|
||||||
* @package TBD
|
* @package TBD
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
|
@ -22,10 +22,10 @@ use phpOMS\Views\View;
|
||||||
/**
|
/**
|
||||||
* Component view.
|
* Component view.
|
||||||
*
|
*
|
||||||
* @package TBD
|
* @package TBD
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
*/
|
*/
|
||||||
class BaseView extends View
|
class BaseView extends View
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,11 @@
|
||||||
*
|
*
|
||||||
* PHP Version 7.4
|
* PHP Version 7.4
|
||||||
*
|
*
|
||||||
* @package TBD
|
* @package TBD
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
*/
|
*/
|
||||||
return ['Navigation' => [
|
return ['Navigation' => [
|
||||||
'Create' => 'Create',
|
'Create' => 'Create',
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,11 @@
|
||||||
*
|
*
|
||||||
* PHP Version 7.4
|
* PHP Version 7.4
|
||||||
*
|
*
|
||||||
* @package TBD
|
* @package TBD
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
*/
|
*/
|
||||||
$MODLANG[1] = [
|
$MODLANG[1] = [
|
||||||
'i:ModuleInstalled' => 'Installation of the module {$1} was successful.',
|
'i:ModuleInstalled' => 'Installation of the module {$1} was successful.',
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,11 @@
|
||||||
*
|
*
|
||||||
* PHP Version 7.4
|
* PHP Version 7.4
|
||||||
*
|
*
|
||||||
* @package TBD
|
* @package TBD
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
*/
|
*/
|
||||||
return ['Media' => [
|
return ['Media' => [
|
||||||
'Account' => 'Account',
|
'Account' => 'Account',
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,11 @@
|
||||||
*
|
*
|
||||||
* PHP Version 7.4
|
* PHP Version 7.4
|
||||||
*
|
*
|
||||||
* @package TBD
|
* @package TBD
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* @var \phpOMS\Views\View $this
|
* @var \phpOMS\Views\View $this
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,11 @@
|
||||||
*
|
*
|
||||||
* PHP Version 7.4
|
* PHP Version 7.4
|
||||||
*
|
*
|
||||||
* @package TBD
|
* @package TBD
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include __DIR__ . '/template-functions.php';
|
include __DIR__ . '/template-functions.php';
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,11 @@
|
||||||
*
|
*
|
||||||
* PHP Version 7.4
|
* PHP Version 7.4
|
||||||
*
|
*
|
||||||
* @package TBD
|
* @package TBD
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use \phpOMS\System\File\FileUtils;
|
use \phpOMS\System\File\FileUtils;
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,11 @@
|
||||||
*
|
*
|
||||||
* PHP Version 7.4
|
* PHP Version 7.4
|
||||||
*
|
*
|
||||||
* @package Modules\Media\Views
|
* @package Modules\Media\Views
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
|
@ -19,10 +19,10 @@ use phpOMS\Views\View;
|
||||||
/**
|
/**
|
||||||
* Media list view.
|
* Media list view.
|
||||||
*
|
*
|
||||||
* @package Modules\Media\Views
|
* @package Modules\Media\Views
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
class MediaCreateView extends View
|
class MediaCreateView extends View
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,11 @@
|
||||||
*
|
*
|
||||||
* PHP Version 7.4
|
* PHP Version 7.4
|
||||||
*
|
*
|
||||||
* @package Modules\Media\Views
|
* @package Modules\Media\Views
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
|
@ -25,10 +25,10 @@ use phpOMS\Views\View;
|
||||||
/**
|
/**
|
||||||
* Media view.
|
* Media view.
|
||||||
*
|
*
|
||||||
* @package Modules\Media\Views
|
* @package Modules\Media\Views
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
class MediaView extends View
|
class MediaView extends View
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user