public function checkLimit(array $options)
    {
        $options['limit'] = (int)$options['limit'];
        if (empty($options['limit']) || $options['limit'] < 1) {
            $options['limit'] = 1;
        }
        $options['limit'] = max(min($options['limit'], $options['maxLimit']), 1);

        return $options;
    }
public function checkLimit(array $options)
    {
        $options['limit'] = (int)$options['limit'];
        if (empty($options['limit']) || $options['limit'] < 1) {
            $options['limit'] = 1;
        }
        $options['limit'] = max(min($options['limit'], $options['maxLimit']), 1);

        return $options;
    }
public function checkLimit ( array $ options ) { $ options [ 'limit' ] = ( int ) $ options [ 'limit' ] ; if ( empty ( $ options [ 'limit' ] ) || $ options [ 'limit' ] < 1 ) { $ options [ 'limit' ] = 1 ; } $ options [ 'limit' ] = max ( min ( $ options [ 'limit' ] , $ options [ 'maxLimit' ] ) , 1 ) ; return $ options ; }
Check the limit parameter and ensure it's within the maxLimit bounds.

@param array $options An array of options with a limit key to be checked.
@return array An array of options for pagination.
Check the limit parameter and ensure it s within the maxLimit bounds .