本文整理汇总了PHP中Engine::endsWith方法的典型用法代码示例。如果您正苦于以下问题:PHP Engine::endsWith方法的具体用法?PHP Engine::endsWith怎么用?PHP Engine::endsWith使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Engine
的用法示例。
在下文中一共展示了Engine::endsWith方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getInteractionTable
private function getInteractionTable()
{
//Returns a presentable HTML table of the user's friend interaction
$warning = "These numbers indicate scores and do not refer to the amount found";
$result = "\n\t\t\t<h5>Interaction</h5>\n\t\t\t<p></p>\n\t\t\t<table class='facts interaction' border='0'>\n\t\t\t\t<tr>\n\t\t\t\t\t<th></th>\n\t\t\t\t\t<th title='{$warning}'>Likes<b>*</b></th>\n\t\t\t\t\t<th title='{$warning}'>Comments<b>*</b></th>\n\t\t\t\t\t<th title='{$warning}'>Tags<b>*</b></th>\n\t\t\t\t</tr>\n\t\t";
foreach ($this->Data['interaction'] as $id => $person) {
$name = $person['name'];
$result .= "\n\t\t\t\t<tr>\n\t\t\t\t\t<td><a href='https://facebook.com/{$id}' target='_blank' title=\"Go to " . (Engine::endsWith($name, "s") ? $name . "'" : $name . "'s") . " profile\">{$name}</a></td>\t\n\t\t\t\t\t<td>" . $person['likes'] . "</td>\t\n\t\t\t\t\t<td>" . $person['comments'] . "</td>\t\n\t\t\t\t\t<td>" . $person['tags'] . "</td>\t\n\t\t\t\t</tr>\n\t\t\t";
}
return $result . "\n\t\t\t</table>\n\t\t\t<p><i><b>*</b> {$warning}</i></p>\n\t\t";
}
示例2: test_getTemplates
public function test_getTemplates()
{
//We need to test the getTemplates function in Engine so that we are able to
//get all the available templates within the system we then test to make sure
//that the template includes a real directory and filename. A correct template
//will use the filename main.php
foreach (Engine::getTemplates() as $value) {
$this->assertEquals(true, file_exists($value) && Engine::endsWith($value, "main.php"));
}
}