• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Video类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中Video的典型用法代码示例。如果您正苦于以下问题:PHP Video类的具体用法?PHP Video怎么用?PHP Video使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了Video类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: run

 public function run()
 {
     $tags = Tag::model()->findAll();
     if ($tags) {
         foreach ($tags as $tag) {
             $post = Post::model()->findAll("FIND_IN_SET(:tag, tags)", array(':tag' => $tag->tag_name));
             $image = Image::model()->findAll("FIND_IN_SET(:tag, tags)", array(':tag' => $tag->tag_name));
             $soft = Soft::model()->findAll("FIND_IN_SET(:tag, seo_keywords)", array(':tag' => $tag->tag_name));
             $video = Video::model()->findAll("FIND_IN_SET(:tag, seo_keywords)", array(':tag' => $tag->tag_name));
             if (!$post && !$image && !$soft && !$video) {
                 $tag->delete();
             } else {
                 $tag->data_count = count($post) + count($image) + count($soft);
                 $tag->save();
             }
         }
     }
     $tagdatas = TagData::model()->findAll();
     if ($tagdatas) {
         foreach ($tagdatas as $value) {
             $modelType = ModelType::model()->findByPk($value->type);
             $model = $modelType->model;
             $data = $model::model()->findByPk($value->content_id);
             if (!$data) {
                 $value->delete();
             }
         }
     }
     $this->controller->message('success', Yii::t('admin', 'Reset Tags Success'), $this->controller->createUrl('index'));
 }
开发者ID:jerrylsxu,项目名称:yiifcms,代码行数:30,代码来源:ResetAction.php


示例2: index

 public function index($page = 1)
 {
     $itemPerPage = 5;
     $videos = Video::getVideos(5, $page);
     /**/
     return View::make("pages.vote")->with('videos', $videos)->with('page', $page);
 }
开发者ID:moonlight87,项目名称:laravel,代码行数:7,代码来源:VoteController.php


示例3: index

 /**
  * Show the application dashboard to the user.
  *
  * @return Response
  */
 public function index()
 {
     $banners = Banner::where('active', 'Y')->orderBy('id', 'desc')->get();
     $news = News::orderBy('date', 'desc')->take(5)->get();
     $videos = Video::orderBy('id', 'desc')->take(5)->get();
     return view('home', compact('banners', 'news', 'videos'));
 }
开发者ID:RelmekTaiwan,项目名称:sebamed,代码行数:12,代码来源:HomeController.php


示例4: __construct

 public function __construct(Video $video)
 {
     $this->video = $video;
     $this->details = $this->getVideoDetails();
     $this->user = DAOFactory::getUserDAO()->findById($video->getUserId());
     $this->videoTO = new VideoTO($this->video, $this->user);
 }
开发者ID:anzasolutions,项目名称:simlandia,代码行数:7,代码来源:abstractfiller.class.php


示例5: add_youtube_video

function add_youtube_video()
{
    global $config;
    require_once $config["path_to_default_site_module"] . "/models/db.php";
    require_once $config["path_to_default_site_module"] . "/models/video.php";
    $ch = curl_init("https://gdata.youtube.com/feeds/api/videos/-/preachcaster?alt=json");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    $json_string_data = curl_exec($ch);
    curl_close($ch);
    $video_data = json_decode($json_string_data, true);
    $db_conn = new db($config["db_connection"]);
    $db_resource = $db_conn->get_resource();
    $video = new Video($db_resource);
    foreach ($video_data["feed"]["entry"] as $single_video) {
        //parse out ID
        $tmp_array = explode("/", $single_video["id"]['$t']);
        $video_id = $tmp_array[count($tmp_array) - 1];
        //rxBS1E0KZQU
        //CQzUsTFqtW0
        $video_params = array("video_id" => $video_id, "author" => $single_video["author"][0]["name"]['$t'], "title" => $single_video["title"]['$t'], "description" => $single_video["content"]['$t'], "date_recorded" => isset($single_video['yt$recorded']) ? $single_video['yt$recorded']['$t'] : null, "location" => isset($single_video['yt$location']) ? $single_video['yt$location']['$t'] : null, "url" => isset($single_video['media$group']['media$player']) ? $single_video['media$group']['media$player'][0]["url"] : null, "duration" => isset($single_video['media$group']['yt$duration']) ? $single_video['media$group']['yt$duration']["seconds"] : null, "comment_url" => isset($single_video['gd$comments']) && isset($single_video['gd$comments']['gd$feedLink']) ? $single_video['gd$comments']['gd$feedLink']["href"] : null, "thumbnails" => isset($single_video['media$group']) && isset($single_video['media$group']['media$thumbnail']) ? $single_video['media$group']['media$thumbnail'] : null);
        $video->add_video($video_params, "YouTube");
    }
    die("here");
}
开发者ID:natestarner,项目名称:preachcaster,代码行数:25,代码来源:add_youtube_video.php


示例6: afficherListeVideos

 /**
  * Récupère les différentes propriétés afin de les afficher
  * @return true si le tableau n'est pas vide
  */
 function afficherListeVideos()
 {
     //requete sql
     if ($this->numpara) {
         $result = mysql_query("SELECT numvideo,legende,numparavideo,ordre FROM if_para_video WHERE numpara='{$this->numpara}' ORDER BY ordre");
         while ($row = mysql_fetch_row($result)) {
             $uneVideo = new Video();
             $uneVideo->numvideo = $row[0];
             $uneVideo->legendeVideo = $row[1];
             $uneVideo->numparavideo = $row[2];
             $uneVideo->numparavideo = $row[2];
             $uneVideo->infosVideo();
             $this->videos[] = $uneVideo;
         }
     } else {
         $result = mysql_query("SELECT numvideo FROM if_video ORDER BY nom_video");
         while ($row = mysql_fetch_row($result)) {
             $uneVideo = new Video();
             $uneVideo->numvideo = $row[0];
             $uneVideo->infosVideo();
             $this->videos[] = $uneVideo;
         }
     }
     if (count($this->videos) >= 1) {
         return true;
     }
 }
开发者ID:rcampistron,项目名称:ParagrapheCMS,代码行数:31,代码来源:ListeVideos.inc.php


示例7: run

 public function run()
 {
     $model = new Video();
     if (isset($_POST['Video'])) {
         $model->attributes = $_POST['Video'];
         //封面、文件
         $model->cover_image = isset($_POST['cover_image']) ? $_POST['cover_image'] : '';
         $model->video_file = isset($_POST['video_file']) ? $_POST['video_file'] : '';
         //标签   (前5个标签有效)
         $tags = trim($_POST['Video']['tags']);
         $unique_tags = array_unique(explode(',', str_replace(array(' ', ','), array('', ','), $tags)));
         $explodeTags = array_slice($unique_tags, 0, 5);
         $model->tags = implode(',', $explodeTags);
         $model->create_time = time();
         $model->update_time = $model->create_time;
         if ($model->save()) {
             $this->controller->message('success', Yii::t('admin', 'Add Success'), $this->controller->createUrl('index'));
         }
     }
     //判断有无栏目
     $article_cat = Catalog::model()->find('type=:type', array(':type' => $this->controller->_type));
     if (!$article_cat) {
         $this->controller->message('error', Yii::t('admin', 'No Catalog'), $this->controller->createUrl('index'));
     }
     $this->controller->render('create', array('model' => $model));
 }
开发者ID:jerrylsxu,项目名称:yiifcms,代码行数:26,代码来源:CreateAction.php


示例8: fillVideo

 public static function fillVideo(Video $video)
 {
     $videoType = DAOFactory::getVideoTypeDAO()->findById($video->getType());
     $videoTypeName = $videoType->getName() . 'Filler';
     $filler = new $videoTypeName($video);
     $video = $filler->getVideoTO();
     $video->setType($videoType->getName());
     return $video;
 }
开发者ID:anzasolutions,项目名称:simlandia,代码行数:9,代码来源:videofiller.class.php


示例9: remove

 public static function remove(Video $video)
 {
     if (!Session::get('is_admin')) {
         if ($video->user_id !== Auth::user()->id_member) {
             return false;
         }
     }
     $video->delete();
     return true;
 }
开发者ID:hristodinev,项目名称:site,代码行数:10,代码来源:Video.php


示例10: actionVideo

 public function actionVideo()
 {
     $model = new Video('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Video'])) {
         $model->attributes = $_GET['Video'];
     }
     $this->render('video', compact('model'));
 }
开发者ID:beckblurry,项目名称:Yii1-Base-Core-V.Alpha.1,代码行数:10,代码来源:ListController.php


示例11: buildArrayVideo

 /**
  * @param array $result
  * @return ArrayObject
  */
 private function buildArrayVideo($result)
 {
     $arrayVideo = new ArrayObject();
     foreach ($result as $row) {
         $video = new Video($row['title'], $row['link'], $row['date']);
         $video->setId($row['id']);
         $arrayVideo->append($video);
     }
     return $arrayVideo;
 }
开发者ID:raigons,项目名称:bureauinteligencia,代码行数:14,代码来源:VideoDao.php


示例12: save_item_action

function save_item_action($data)
{
    global $fpdo;
    debug($data, 'posted data');
    $oVideo = new Video($data['path']);
    $video_id = $oVideo->get_videoID();
    $data['path'] = $video_id;
    debug($data['path'], 'posted path');
    $oItem = new Item($fpdo);
    $id = $oItem->add($data);
    debug($id, 'id');
}
开发者ID:MattCouv,项目名称:dev.batata.fr,代码行数:12,代码来源:controllers.php


示例13: smarty_cms_function_Video

function smarty_cms_function_Video($params, &$smarty)
{
    $vid = new Video();
    if (isset($params['url'])) {
        $vid->setVideoUrl($params['url']);
    }
    if (isset($params['width'])) {
        $vid->setWidth((int) $params['width']);
    }
    if (isset($params['height'])) {
        $vid->setHeight((int) $params['height']);
    }
    return $vid->getHtml();
}
开发者ID:retohugi,项目名称:CMSMS-Plugins,代码行数:14,代码来源:function.video.php


示例14: getRandomCompositionConsideringRelevance

 public function getRandomCompositionConsideringRelevance()
 {
     $composerModel = new Composer();
     $videoModel = new Video();
     $lessonCompositionModel = new LessonComposition();
     $lessonComposerModel = new LessonComposer();
     $composition['composition'] = $this->getRandomComposition();
     $composerId = $composition['composition']['composer_id'];
     $compositionId = $composition['composition']['id'];
     $composition['videos'] = $videoModel->getVideosComposition($compositionId);
     $composition['composer'] = $composerModel->getComposer($composerId);
     $composition['lessons']['composer'] = $lessonComposerModel->getLessonsComposer($composerId);
     $composition['lessons']['composition'] = $lessonCompositionModel->getLessonsComposition($compositionId);
     return $composition;
 }
开发者ID:ojoven,项目名称:amadeus,代码行数:15,代码来源:composition.php


示例15: submit

 /**
  * Actually inserts the Video into the DB if validation passes
  *
  * @param $data Array
  * @return bool
  */
 public function submit(array $data)
 {
     list($url, $provider) = $this->getUrlAndProvider($data['Video']);
     $this->video->addVideo($url, $provider, false, $data['Watch']);
     $this->getOutput()->redirect($this->video->getTitle()->getFullURL());
     return true;
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:13,代码来源:SpecialAddVideo.php


示例16: actionDisplay

 public function actionDisplay()
 {
     $id = Request::getVar('id', null);
     $alias = Request::getVar('alias', null);
     $model = Video::getInstance();
     if ($id == null or $id == "") {
         if ($alias != null and $alias != "") {
             $obj_item = $model->getItemByAlias($alias);
         } else {
             header("Location: /");
         }
     } else {
         $obj_item = $model->getItem($id);
     }
     $items = $model->getItems($obj_item['catID'], true, 4);
     $items2 = $model->getItems($obj_item['catID'], false, 9);
     $obj_category = $model->getCategory($obj_item['catID']);
     $data['item'] = $obj_item;
     $data['items'] = $items;
     $data['items2'] = $items2;
     $data['category'] = $obj_category;
     $page_title = $obj_item['title'];
     $page_keyword = $obj_item['metakey'] != "" ? $obj_item['metakey'] : $page_title;
     $page_description = $obj_item['metadesc'] != "" ? $obj_item['metadesc'] : $page_title;
     setSysConfig("seopage.title", $page_title);
     setSysConfig("seopage.keyword", $page_keyword);
     setSysConfig("seopage.description", $page_description);
     Request::setVar('alias', $obj_category['alias']);
     $this->render('default', $data);
 }
开发者ID:ducdm87,项目名称:gamelienminh,代码行数:30,代码来源:DetailController.php


示例17: add

 /**
  * 登録
  *
  * @return CakeResponse
  */
 public function add()
 {
     if ($this->request->isPost()) {
         if (!($status = $this->NetCommonsWorkflow->parseStatus())) {
             $this->throwBadRequest();
             return;
         }
         // 保存dataの準備
         $data = $this->__readySaveData($this->data);
         // 登録データ作成
         $video = $this->Video->create();
         $data = Hash::merge($video, $data, array($this->Video->alias => array('status' => $status, 'block_id' => $this->viewVars['blockId'], 'language_id' => $this->viewVars['languageId'])), array($this->Comment->alias => array('block_key' => $this->viewVars['blockKey'])));
         if (Video::isFfmpegEnable()) {
             // 登録
             $this->Video->addSaveVideo($data, $this->viewVars['roomId']);
         } else {
             // 登録 動画を自動変換しない
             $this->Video->addNoConvertSaveVideo($data);
         }
         // 正常時
         if ($this->handleValidationError($this->Video->validationErrors)) {
             if (!$this->request->is('ajax')) {
                 // 一覧へ
                 $this->redirect('/videos/videos/index/' . $this->viewVars['frameId']);
             }
         }
     }
     $results = $this->__init();
     $this->set($results);
 }
开发者ID:Onasusweb,项目名称:Videos,代码行数:35,代码来源:VideosEditController.php


示例18: actionVideo

 public function actionVideo()
 {
     $criteria = new CDbCriteria();
     $criteria->limit = 25;
     $model = Video::model()->is_publish()->findAll($criteria);
     $this->setRss($model, 'video', 'Video', 'Rss Feed Video', $this->createUrl('video'));
 }
开发者ID:beckblurry,项目名称:Yii1-Base-Core-V.Alpha.1,代码行数:7,代码来源:RssController.php


示例19: detail

 public function detail($id)
 {
     $video = Video::getVideo($id);
     $previous = Video::getPreviousVideo($id);
     $next = Video::getNextVideo($id);
     return View::make('pages.video.detail')->with('video', $video)->with('previous', $previous ? $previous->id : null)->with('next', $next ? $next->id : null);
 }
开发者ID:moonlight87,项目名称:laravel,代码行数:7,代码来源:VideoController.php


示例20: run

 public function run()
 {
     $ids = Yii::app()->request->getParam('id');
     $command = Yii::app()->request->getParam('command');
     empty($ids) && $this->controller->message('error', Yii::t('admin', 'No Select'));
     if (!is_array($ids)) {
         $ids = array($ids);
     }
     $criteria = new CDbCriteria();
     $criteria->addInCondition('id', $ids);
     switch ($command) {
         case 'delete':
             //删除
             foreach ((array) $ids as $id) {
                 $videoModel = Video::model()->findByPk($id);
                 if ($videoModel) {
                     Uploader::deleteFile(ROOT_PATH . $videoModel->cover_image);
                 }
             }
             Video::model()->deleteAll($criteria);
             break;
         case 'show':
             //显示
             Video::model()->updateAll(['status' => 'Y'], $criteria);
             break;
         case 'hidden':
             //隐藏
             Video::model()->updateAll(['status' => 'N'], $criteria);
             break;
         default:
             $this->controller->message('error', Yii::t('admin', 'Error Operation'));
     }
     $this->controller->message('success', Yii::t('admin', 'Batch Operate Success'));
 }
开发者ID:jerrylsxu,项目名称:yiifcms,代码行数:34,代码来源:BatchAction.php



注:本文中的Video类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP View类代码示例发布时间:2022-05-23
下一篇:
PHP Versions类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap