protected function GenericResource::normalizePagination in Auth0 Single Sign On 8.2
Normalize pagination parameters.
Parameters
array $params Original parameters to normalize.:
null|integer $page Page number, zero-based.:
null|integer $per_page Per-page count, zero-based.:
Return value
array
6 calls to GenericResource::normalizePagination()
- Roles::getPermissions in vendor/
auth0/ auth0-php/ src/ API/ Management/ Roles.php - Get the permissions associated to a role. Required scope: "read:roles"
- Roles::getUsers in vendor/
auth0/ auth0-php/ src/ API/ Management/ Roles.php - Get users assigned to a specific role. Required scopes:
- Users::getAll in vendor/
auth0/ auth0-php/ src/ API/ Management/ Users.php - Search all Users. Required scopes:
- Users::getLogs in vendor/
auth0/ auth0-php/ src/ API/ Management/ Users.php - Get log entries for a specific user. Required scope: "read:logs"
- Users::getPermissions in vendor/
auth0/ auth0-php/ src/ API/ Management/ Users.php - Get all permissions for a specific user. Required scope: "read:users"
File
- vendor/
auth0/ auth0-php/ src/ API/ Management/ GenericResource.php, line 52
Class
- GenericResource
- Class GenericResource. Extended by Management API endpoints classes.
Namespace
Auth0\SDK\API\ManagementCode
protected function normalizePagination(array $params, $page = null, $per_page = null) {
$pagination = [
'page' => isset($params['page']) ? $params['page'] : $page,
'per_page' => isset($params['per_page']) ? $params['per_page'] : $per_page,
];
// Filter out empty values.
$pagination = array_filter($pagination);
// Make sure we have absolute integers.
$pagination = array_map(function ($val) {
return abs(intval($val));
}, $pagination);
return array_merge($params, $pagination);
}