Commit 75b15be5 authored by Keven's avatar Keven
Browse files

Added metadata modification on File

parent d2f91633
......@@ -6,10 +6,10 @@ class File extends FileCommand
{
/**
*
* @param FolderInterface $folder Folder instance, folder URL or folder unique slug
* @param \Libcast\Client\Model\FileInterface $file File instance, file URL or file unique slug
*/
public function __construct($folder = null)
public function __construct($file = null)
{
$this->setFile($folder);
$this->setFile($file);
}
}
\ No newline at end of file
}
......@@ -38,4 +38,4 @@ abstract class FileCommand extends Command
$this->setVar('file', $file);
}
}
}
\ No newline at end of file
}
......@@ -26,13 +26,14 @@ class UpdateFile extends Command
/**
*
* @param MediaInterface $media
* @param FileInterface $file
*/
public function __construct(FileInterface $file)
{
$this->fullPath = $file->getHref();
$this->setPayload(array(
'name' => $file->getName(),
'name' => $file->name,
'metadata' => $file->metadata,
));
}
}
......@@ -8,6 +8,7 @@ use Libcast\Client\Model\StreamInterface;
use JMS\Serializer\Annotation\Type;
use JMS\Serializer\Annotation\XmlRoot;
use JMS\Serializer\Annotation\SerializedName;
/**
*
......@@ -57,6 +58,14 @@ class File extends Entity implements FileInterface
*/
protected $duration;
/**
*
* @Type("Libcast\Client\Entity\KeyValuePairs")
* @SerializedName("metadata")
* @var array
*/
protected $metadata = [];
/**
* URL of the thumbnail
*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment