当前位置: 首页>>代码示例>>PHP>>正文


PHP UserDAO::getFilms方法代码示例

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


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

示例1: addMarker

 public static function addMarker()
 {
     $film = new Film(null, "a film", "http://www.cnn.com");
     $updatedFilm = FilmDAO::insert($film);
     $user = new User(null, "test@test.com", "john doe", User::hash("password"));
     $updatedUser = UserDAO::add($user);
     $markerType = MarkerTypeDAO::getByName('Event');
     UserDAO::addFilm($updatedUser->getUserId(), $updatedFilm->getId());
     $myVideos = UserDAO::getFilms($updatedUser->getUserId());
     var_dump($myVideos);
     $array = array("id" => NULL, "filmId" => $updatedFilm->getId(), "markerId" => $markerType->getId(), "start" => 0.5, "end" => 0.6, "text" => "this is stuff", "target" => "target", "userId" => $updatedUser->getUserId());
     $marker = new FilmMarker($array);
     $markerWithId = FilmMarkerDAO::insertMarker($marker);
     //var_dump($markerWithId);
     UserDAO::removeFilm($updatedUser->getUserId(), $updatedFilm->getId());
     FilmMarkerDAO::delete($markerWithId->getId());
     UserDAO::delete($updatedUser->getUserId());
     FilmDAO::delete($film->getId());
 }
开发者ID:rochester-rcl,项目名称:rcl-video-annotation,代码行数:19,代码来源:test.php

示例2: filter_input

<?php

include_once '../user.php';
include_once '../film.php';
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
$postAction = filter_input(INPUT_POST, 'action');
$email = filter_input(INPUT_POST, "email");
$userPassword = filter_input(INPUT_POST, "password");
if ($postAction == 'login') {
    $userReturn = UserDAO::loginUser($email, $userPassword);
    if ($userReturn) {
        $userFilm = UserDAO::getFilms($userReturn->getUserId());
        $userFilmUrl = $userFilm[0]['film_url'];
        $userArray = [];
        $userArray['email'] = $userReturn->getUserEmail();
        $userArray['filmUrl'] = $userFilmUrl;
        $userArray['fullName'] = $userReturn->getFullName();
        echo json_encode($userArray);
    } else {
        echo "USER NOT found!!!!";
    }
}
开发者ID:rochester-rcl,项目名称:rcl-video-annotation,代码行数:26,代码来源:login.php


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