本文整理汇总了PHP中Movie::findById方法的典型用法代码示例。如果您正苦于以下问题:PHP Movie::findById方法的具体用法?PHP Movie::findById怎么用?PHP Movie::findById使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Movie
的用法示例。
在下文中一共展示了Movie::findById方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
?>
" width="280px" height="400px" class="img-rounded">
</div>
</div>
<div class="col-xs-8">
<h4 class="text-primary">Born</h4>
<p><?php
echo $star->getBirthdate();
?>
</p>
<h4 class="text-primary">Known in</h4>
<div class="row">
<?php
foreach ($portraitedin as $movieID) {
$movie = Movie::findById($movieID->getMovieId());
echo "<div class='col-xs-3'>";
echo "<a href='#' id='" . $movie->getId() . "' onclick='sendMovieID(this.id)'>";
echo "<div class='thumbnail'>";
echo "<img src='" . $movie->getPosterUrl() . "'>";
echo "<div class='caption text-center'>";
echo "<p>" . $movie->getName() . "</p>";
echo "</div>";
echo "</div>";
echo "</a>";
echo "</div>";
}
?>
<form id="movie-form" action="movie.php" method="post">
<input type="hidden" name="movieID" id="movieID">
</form>
示例2:
<!-- Latest compiled and minified JavaScript -->
<script src="http://netdna.bootstrapcdn.com/bootstrap/3.0.2/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="css.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="server.js" type="text/javascript"></script>
</head>
<body class="bg2">
<?php
require "server/DatabasePDO.php";
require "server/Movie.php";
require "server/Star.php";
require "server/PortraitedIn.php";
require "server/Director.php";
$movie = Movie::findById($_POST["movieID"]);
$portraitedin = PortraitedIn::findByMovieId($_POST["movieID"]);
$director = Director::findById($_POST["movieID"]);
?>
<img id="upper_left" class="reflect" src="images/spiderman.png" width="450px">
<div class="container result">
<div class="row text-center header">
<div id="logo"></div>
</div>
<!--Character Start-->
<div class="panel panel-info">
<div class="panel-heading text-center">
MOVIE
</div>