ciebit / videos
Modulo de representacao de entidades de video
v0.2.0
2020-06-15 13:52 UTC
Requires
- php: ^7.4
- ciebit/sql-helper: ^1.0.0
- myclabs/php-enum: ^1.6.1
- robmorgan/phinx: ^0.10.6
Requires (Dev)
- phpunit/dbunit: ^3.0
- phpunit/phpunit: ^6.5
This package is auto-updated.
Last update: 2025-03-16 00:51:33 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();