本文整理匯總了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;
}