本文整理汇总了PHP中UserDao::foundRows方法的典型用法代码示例。如果您正苦于以下问题:PHP UserDao::foundRows方法的具体用法?PHP UserDao::foundRows怎么用?PHP UserDao::foundRows使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserDao
的用法示例。
在下文中一共展示了UserDao::foundRows方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
}
// Number of user to display
$limit = 15;
$userList = array();
// Raise an evt
$pluginAnswered = false;
$evParams = array('searchToken' => $userName, 'limit' => $limit, 'codendiUserOnly' => $codendiUserOnly, 'userList' => &$userList, 'pluginAnswered' => &$pluginAnswered);
$em =& EventManager::instance();
$em->processEvent("ajax_search_user", $evParams);
// If no plugin answered, search in DB.
if (!$pluginAnswered) {
// search user dao
$userDao = new UserDao(CodendiDataAccess::instance());
$dar = $userDao->searchUserNameLike($userName, $limit);
while ($dar->valid()) {
$row = $dar->current();
$userList[] = $row['realname'] . " (" . $row['user_name'] . ")";
$dar->next();
}
if ($userDao->foundRows() > $limit) {
$userList[] = '<strong>...</strong>';
}
}
//
// Display
//
echo "<ul>\n";
foreach ($userList as $user) {
echo " <li>{$user}</li>\n";
}
echo "</ul>\n";