本文整理汇总了PHP中UserDao::firstUsernamesLetters方法的典型用法代码示例。如果您正苦于以下问题:PHP UserDao::firstUsernamesLetters方法的具体用法?PHP UserDao::firstUsernamesLetters怎么用?PHP UserDao::firstUsernamesLetters使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserDao
的用法示例。
在下文中一共展示了UserDao::firstUsernamesLetters方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: validateRequest
/**
* Validate the HTTP request for the user members pane
*
* @param Integer $groupId Id of the project
* @param HTTPRequest $request HTTP request
*
* @return Array
*/
public function validateRequest($groupId, $request)
{
$userDao = new UserDao();
$res = $userDao->firstUsernamesLetters();
$allowedBeginValues = array();
foreach ($res as $data) {
$allowedBeginValues[] = $data['capital'];
}
$result['allowed_begin_values'] = $allowedBeginValues;
$validBegin = new Valid_WhiteList('begin', $allowedBeginValues);
$validBegin->required();
$validInProject = new Valid_UInt('in_project');
$validInProject->required();
$result['offset'] = $request->exist('browse') ? 0 : $request->getValidated('offset', 'uint', 0);
$result['number_per_page'] = $request->exist('number_per_page') ? $request->getValidated('number_per_page', 'uint', 0) : 15;
$result['search'] = $request->getValidated('search', 'string', '');
$result['begin'] = $request->getValidated('begin', $validBegin, '');
$result['in_project'] = $request->getValidated('in_project', $validInProject, $groupId);
$result['user'] = $request->get('user');
$result['add_user_name'] = $request->get('add_user_name');
return $result;
}