mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-08 10:34:34 +00:00
49 lines
853 B
PHP
49 lines
853 B
PHP
<?php
|
|
|
|
namespace Alchemy\Phrasea\Databox\Subdef;
|
|
|
|
class SubdefPreset
|
|
{
|
|
/**
|
|
* @var string
|
|
*/
|
|
private $mediaType;
|
|
/**
|
|
* @var string
|
|
*/
|
|
private $label;
|
|
/**
|
|
* @var array
|
|
*/
|
|
private $definitions;
|
|
|
|
/**
|
|
* @param string $mediaType
|
|
* @param array $definitions
|
|
*/
|
|
public function __construct($mediaType, array $definitions)
|
|
{
|
|
foreach ($definitions as $definition) {
|
|
if (!$definition instanceof Subdef) {
|
|
}
|
|
}
|
|
$this->mediaType = (string)$mediaType;
|
|
$this->definitions = $definitions;
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getMediaType()
|
|
{
|
|
return $this->label;
|
|
}
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
public function getDefinitions()
|
|
{
|
|
return $this->definitions;
|
|
}
|
|
} |