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


PHP Engine::endsWith方法代码示例

本文整理汇总了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";
 }
开发者ID:shaungeorge,项目名称:facebook_analyser,代码行数:11,代码来源:Result.php

示例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"));
     }
 }
开发者ID:shaungeorge,项目名称:facebook_analyser,代码行数:10,代码来源:EngineTest.php


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