本文整理汇总了PHP中Recipe::imageUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP Recipe::imageUrl方法的具体用法?PHP Recipe::imageUrl怎么用?PHP Recipe::imageUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Recipe
的用法示例。
在下文中一共展示了Recipe::imageUrl方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testDontBreakIfRecipeNotExist
function testDontBreakIfRecipeNotExist()
{
$recipe = new Recipe(rand(-1, 5));
$this->assertTrue(!empty($recipe->name()));
$this->assertTrue(!empty($recipe->imageUrl()));
}
示例2: testIfRecipeExists
function testIfRecipeExists()
{
$recipe = new Recipe(rand(-1, 5));
$this->assertTrue(!empty($recipe->name()));
$this->assertTrue(!empty($recipe->imageUrl()));
}
示例3:
</table>
<?php
} else {
echo "<p>Sorry, you don't currently have any starred recipes, get started by starring recipes you like</p>";
}
?>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-8">
<div class="thumbnail">
<?php
if ($recipe->exists()) {
?>
<img id="recipe-photo" src="<?php
echo "images/recipes/" . $recipe->imageUrl();
?>
" title="<?php
echo $recipe->name();
?>
photo" alt="<?php
echo $recipe->name();
?>
photo">
<?php
}
?>
<div class="caption">
<h1><?php
echo $recipe->name();