本文整理汇总了PHP中Video::setSet方法的典型用法代码示例。如果您正苦于以下问题:PHP Video::setSet方法的具体用法?PHP Video::setSet怎么用?PHP Video::setSet使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Video
的用法示例。
在下文中一共展示了Video::setSet方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Video
if (isset($matches) && count($matches) > 0) {
$Set = Set::Filter($Sets, $Model->getID(), NULL, $matches['Name'] . $matches['Number'], $matches['Prefix']);
if (!$Set) {
continue;
} else {
$Set = $Set[0];
}
/* @var $VideoInDB Video */
$VideosInDB = Video::Filter($Videos, $ModelID, $Set->getID(), $matches['Name'] . $matches['Number'] . $matches['Suffix']);
if ($VideosInDB) {
$VideoInDB = $VideosInDB[0];
$cis = CacheImage::Filter($CacheImages, NULL, NULL, NULL, NULL, NULL, $VideoInDB->getID());
CacheImage::DeleteMulti($cis, $CurrentUser);
} else {
$VideoInDB = new Video();
$VideoInDB->setSet($Set);
}
$VideoInDB->setFileName($matches['Prefix'] . $matches['Name'] . $matches['Number'] . $matches['Suffix']);
$VideoInDB->setFileExtension($matches['Extension']);
$VideoInDB->setFileSize($FileInfo->getSize());
$VideoInDB->setFileCheckSum(Utils::CalculateMD5($FileInfo->getRealPath()));
$VideoInDB->setFileCRC32(Utils::CalculateCRC32($FileInfo->getRealPath()));
if (!$VideoInDB->getID() && $CurrentUser->hasPermission(RIGHT_VIDEO_ADD)) {
Video::Insert($VideoInDB, $CurrentUser);
} else {
if ($CurrentUser->hasPermission(RIGHT_VIDEO_EDIT)) {
Video::Update($VideoInDB, $CurrentUser);
}
}
}
}
示例2: VideoSearchParameters
$Videos = Video::GetVideos(new VideoSearchParameters($VideoID, FALSE, $SetID, FALSE, $ModelID));
if ($Videos) {
$Video = $Videos[0];
} else {
header('location:set.php?model_id=' . $ModelID);
exit;
}
$Set = $Video->getSet();
$Model = $Set->getModel();
} else {
$Video = new Video(NULL, $lang->g('LabelNew'));
$Set = Set::GetSets(new SetSearchParameters($SetID));
if ($Set) {
$Set = $Set[0];
$Model = $Set->getModel();
$Video->setSet($Set);
} else {
header('location:index.php');
exit;
}
}
if (array_key_exists('hidAction', $_POST) && $_POST['hidAction'] == 'VideoView') {
$Video->setFileName(Utils::NullIfEmpty($_POST['txtFilename']));
$Video->setFileExtension(Utils::NullIfEmpty($_POST['txtFileExtension']));
$Video->setFileSize(intval($_POST['txtFilesize']));
$Video->setFileCheckSum(Utils::NullIfEmpty($_POST['txtFileChecksum']));
$Video->setFileCRC32(Utils::NullIfEmpty($_POST['txtFileCRC32']));
$tags = Tag::GetTagArray($_POST['txtTags']);
if ($Video->getID()) {
if ($DeleteVideo) {
if (Video::Delete($Video, $CurrentUser)) {