mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-02-16 09:18:42 +00:00
Auto docblock fixes.
This commit is contained in:
parent
833cc7abe6
commit
819734daca
32
Controller/FileUploaderTrait.php
Executable file → Normal file
32
Controller/FileUploaderTrait.php
Executable file → Normal file
|
|
@ -19,7 +19,7 @@ use phpOMS\Message\RequestAbstract;
|
||||||
use phpOMS\Message\ResponseAbstract;
|
use phpOMS\Message\ResponseAbstract;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Options trait.
|
* Trait for setting up file upload functionality.
|
||||||
*
|
*
|
||||||
* @package Modules\Media\Controller
|
* @package Modules\Media\Controller
|
||||||
* @license OMS License 2.0
|
* @license OMS License 2.0
|
||||||
|
|
@ -28,21 +28,21 @@ use phpOMS\Message\ResponseAbstract;
|
||||||
*/
|
*/
|
||||||
trait FileUploaderTrait
|
trait FileUploaderTrait
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Setup file uploader.
|
* Setup file uploader.
|
||||||
*
|
*
|
||||||
* @param RequestAbstract $request Request
|
* @param RequestAbstract $request Request
|
||||||
* @param ResponseAbstract $response Response
|
* @param ResponseAbstract $response Response
|
||||||
* @param mixed $data Misc. data
|
* @param mixed $data Misc. data
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
*/
|
*/
|
||||||
public static function setUpFileUploaderTrait(RequestAbstract $request, ResponseAbstract $response, $data = null) : void
|
public static function setUpFileUploaderTrait(RequestAbstract $request, ResponseAbstract $response, $data = null) : void
|
||||||
{
|
{
|
||||||
$head = $response->get('Content')->getData('head');
|
$head = $response->get('Content')->getData('head');
|
||||||
$head->addAsset(AssetType::JS, '/Modules/Media/Controller.js', ['type' => 'module']);
|
$head->addAsset(AssetType::JS, '/Modules/Media/Controller.js', ['type' => 'module']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
2
Models/MediaClass.php
Executable file → Normal file
2
Models/MediaClass.php
Executable file → Normal file
|
|
@ -15,7 +15,7 @@ declare(strict_types=1);
|
||||||
namespace Modules\Media\Models;
|
namespace Modules\Media\Models;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Media class.
|
* Represents the type/class of media in the application.
|
||||||
*
|
*
|
||||||
* @package Modules\Media\Models
|
* @package Modules\Media\Models
|
||||||
* @license OMS License 2.0
|
* @license OMS License 2.0
|
||||||
|
|
|
||||||
16
Models/MediaContent.php
Executable file → Normal file
16
Models/MediaContent.php
Executable file → Normal file
|
|
@ -15,7 +15,7 @@ declare(strict_types=1);
|
||||||
namespace Modules\Media\Models;
|
namespace Modules\Media\Models;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Media class.
|
* Media content class.
|
||||||
*
|
*
|
||||||
* @package Modules\Media\Models
|
* @package Modules\Media\Models
|
||||||
* @license OMS License 2.0
|
* @license OMS License 2.0
|
||||||
|
|
@ -32,17 +32,13 @@ class MediaContent implements \JsonSerializable
|
||||||
*/
|
*/
|
||||||
public int $id = 0;
|
public int $id = 0;
|
||||||
|
|
||||||
public string $content = '';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return int
|
* Content of the media.
|
||||||
*
|
*
|
||||||
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function getId() : int
|
public string $content = '';
|
||||||
{
|
|
||||||
return $this->id;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
|
|
@ -50,8 +46,8 @@ class MediaContent implements \JsonSerializable
|
||||||
public function toArray() : array
|
public function toArray() : array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'id' => $this->id,
|
'id' => $this->id,
|
||||||
'content' => $this->content,
|
'content' => $this->content,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
2
Models/MediaStatus.php
Executable file → Normal file
2
Models/MediaStatus.php
Executable file → Normal file
|
|
@ -15,7 +15,7 @@ declare(strict_types=1);
|
||||||
namespace Modules\Media\Models;
|
namespace Modules\Media\Models;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Media class.
|
* Media status enum.
|
||||||
*
|
*
|
||||||
* @package Modules\Media\Models
|
* @package Modules\Media\Models
|
||||||
* @license OMS License 2.0
|
* @license OMS License 2.0
|
||||||
|
|
|
||||||
2
Models/NullCollection.php
Executable file → Normal file
2
Models/NullCollection.php
Executable file → Normal file
|
|
@ -15,7 +15,7 @@ declare(strict_types=1);
|
||||||
namespace Modules\Media\Models;
|
namespace Modules\Media\Models;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Media class.
|
* NullCollection class.
|
||||||
*
|
*
|
||||||
* @package Modules\Media\Models
|
* @package Modules\Media\Models
|
||||||
* @license OMS License 2.0
|
* @license OMS License 2.0
|
||||||
|
|
|
||||||
38
Models/NullMedia.php
Executable file → Normal file
38
Models/NullMedia.php
Executable file → Normal file
|
|
@ -15,7 +15,7 @@ declare(strict_types=1);
|
||||||
namespace Modules\Media\Models;
|
namespace Modules\Media\Models;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Media class.
|
* NullMedia class represents a null object of the Media class.
|
||||||
*
|
*
|
||||||
* @package Modules\Media\Models
|
* @package Modules\Media\Models
|
||||||
* @license OMS License 2.0
|
* @license OMS License 2.0
|
||||||
|
|
@ -24,24 +24,24 @@ namespace Modules\Media\Models;
|
||||||
*/
|
*/
|
||||||
final class NullMedia extends Media
|
final class NullMedia extends Media
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor.
|
||||||
*
|
*
|
||||||
* @param int $id Model id
|
* @param int $id Model id
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function __construct(int $id = 0)
|
public function __construct(int $id = 0)
|
||||||
{
|
{
|
||||||
$this->id = $id;
|
$this->id = $id;
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function jsonSerialize() : mixed
|
public function jsonSerialize() : mixed
|
||||||
{
|
{
|
||||||
return ['id' => $this->id];
|
return ['id' => $this->id];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
33
Models/NullMediaContent.php
Executable file → Normal file
33
Models/NullMediaContent.php
Executable file → Normal file
|
|
@ -15,7 +15,8 @@ declare(strict_types=1);
|
||||||
namespace Modules\Media\Models;
|
namespace Modules\Media\Models;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Media class.
|
* Class NullMediaContent
|
||||||
|
* Represents null media content.
|
||||||
*
|
*
|
||||||
* @package Modules\Media\Models
|
* @package Modules\Media\Models
|
||||||
* @license OMS License 2.0
|
* @license OMS License 2.0
|
||||||
|
|
@ -24,23 +25,23 @@ namespace Modules\Media\Models;
|
||||||
*/
|
*/
|
||||||
final class NullMediaContent extends MediaContent
|
final class NullMediaContent extends MediaContent
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param int $id Model id
|
* @param int $id Model id
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function __construct(int $id = 0)
|
public function __construct(int $id = 0)
|
||||||
{
|
{
|
||||||
$this->id = $id;
|
$this->id = $id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function jsonSerialize() : mixed
|
public function jsonSerialize() : mixed
|
||||||
{
|
{
|
||||||
return ['id' => $this->id];
|
return ['id' => $this->id];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
2
Models/NullMediaType.php
Executable file → Normal file
2
Models/NullMediaType.php
Executable file → Normal file
|
|
@ -15,7 +15,7 @@ declare(strict_types=1);
|
||||||
namespace Modules\Media\Models;
|
namespace Modules\Media\Models;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Media type class.
|
* Null media type class.
|
||||||
*
|
*
|
||||||
* @package Modules\Media\Models
|
* @package Modules\Media\Models
|
||||||
* @license OMS License 2.0
|
* @license OMS License 2.0
|
||||||
|
|
|
||||||
30
Models/Reference.php
Executable file → Normal file
30
Models/Reference.php
Executable file → Normal file
|
|
@ -17,6 +17,8 @@ namespace Modules\Media\Models;
|
||||||
/**
|
/**
|
||||||
* Reference class.
|
* Reference class.
|
||||||
*
|
*
|
||||||
|
* This class represents a reference to a media file. It extends the Media class.
|
||||||
|
*
|
||||||
* @package Modules\Media\Models
|
* @package Modules\Media\Models
|
||||||
* @license OMS License 2.0
|
* @license OMS License 2.0
|
||||||
* @link https://jingga.app
|
* @link https://jingga.app
|
||||||
|
|
@ -24,19 +26,19 @@ namespace Modules\Media\Models;
|
||||||
*/
|
*/
|
||||||
class Reference extends Media
|
class Reference extends Media
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Extension name.
|
* The file extension of the reference file.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public string $extension = 'reference';
|
public string $extension = 'reference';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is reference.
|
* The media class of the reference.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public int $class = MediaClass::REFERENCE;
|
public int $class = MediaClass::REFERENCE;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
0
Models/ReferenceMapper.php
Executable file → Normal file
0
Models/ReferenceMapper.php
Executable file → Normal file
0
Models/UploadStatus.php
Executable file → Normal file
0
Models/UploadStatus.php
Executable file → Normal file
Loading…
Reference in New Issue
Block a user