本文整理汇总了PHP中Movie::getMovie方法的典型用法代码示例。如果您正苦于以下问题:PHP Movie::getMovie方法的具体用法?PHP Movie::getMovie怎么用?PHP Movie::getMovie使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Movie
的用法示例。
在下文中一共展示了Movie::getMovie方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: save
public function save(Movie $movie)
{
$commentData = array('mov_id' => $movie->getcategory()->getId(), 'mov_description_short' => $movie->getMovie());
if ($movie->getId()) {
$this->getDb()->update('movie', $movieData, array('mov_id' => $movie->getId()));
} else {
$this->getDb()->insert('mov', $movieData);
$id = $this->getDb()->lastInsertId();
$movie->setId($id);
}
}
示例2: movie
public function movie()
{
if (isset($_GET['id'])) {
$movie = new Movie();
$id = $_GET['id'];
$movie_data = $movie->getMovie($id);
//no movie is found. Redirect to movies page
if ($movie_data['id'] === null) {
$this->index("Wrong movie index.");
} else {
$this->registry->template->show('movie', $movie_data);
}
}
}
示例3: array
if ($user_id && $target_id && $target_type) {
$data = array();
$data['user_id'] = $user_id;
$data['target_id'] = $target_id;
$data['target_type'] = $target_type;
$data['date_added'] = date("Y-m-d H:i:s");
$res = $stream->addWatch($data);
if ($res) {
$data = array();
$data['user_id'] = $user_id;
$data['target_id'] = $target_id;
$data['user_data'] = $_SESSION['loggeduser_details'];
$data['target_type'] = $target_type;
if ($target_type == 1) {
// show
$show = new Show();
$data['target_data'] = $show->getShow($target_id, 0);
} elseif ($target_type == 2) {
// movie
$movie = new Movie();
$data['target_data'] = $movie->getMovie($target_id);
} elseif ($target_type == 3) {
// episode
$show = new Show();
$data['target_data'] = $show->getEpisodeById($target_id);
}
$data['event_type'] = 5;
$data['event_date'] = date("Y-m-d H:i:s");
$stream->addActivity($data);
}
}