ciebit/videos

Modulo de representacao de entidades de video

v0.2.0 2020-06-15 13:52 UTC

This package is auto-updated.

Last update: 2020-09-15 14:38:36 UTC


README

Simple entity video and persistence.

Example store

use Ciebit\Videos\File;
use Ciebit\Videos\Status;
use Ciebit\Videos\Storages\Database\Sql;

$video = new File('Title Video', 'uri-video.mp4', Status::ACTIVE());

$pdo = new PDO('mysql:dbname=cb_videos;host=localhost;charset=utf8', 'root', '');
$videoStorage = new Sql($pdo);
$videoStorage->store($video);

Example get

use Ciebit\Videos\Storages\Database\Sql;

$pdo = new PDO('mysql:dbname=cb_videos;host=localhost;charset=utf8', 'root', '');
$videoStorage = new Sql($pdo);
$video = $videoStorage->addFilterById('=', '2')->find();

echo $video->getTitle();