public function findBlockedListByUserIdList($userId, array $userIdList) { if (!$userId) { return null; } $list = $this->userBlockDao->findBlockedList($userId, $userIdList); $users = array(); if ($list) { foreach ($list as $user) { $users[$user->blockedUserId] = $user; } } $blockList = array(); foreach ($userIdList as $blockedUserId) { $blockList[$blockedUserId] = array_key_exists($blockedUserId, $users); } return $blockList; }